:root {
    --bg-color: #1a1210;
    --surface-color: rgba(45, 30, 25, 0.6);
    --surface-hover: rgba(60, 40, 30, 0.8);
    --text-primary: #fdf8f5;
    --text-secondary: #cda891;
    --accent-primary: #d4a373;
    --accent-secondary: #e26d5c;
    --gradient-1: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --glass-border: rgba(212, 163, 115, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Background Blobs for dynamic look */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: 10%;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.highlight {
    color: var(--accent-primary);
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-link {
    color: var(--accent-primary);
    position: relative;
}
.highlight-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-primary);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
.highlight-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-fast);
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--accent-primary);
}

.btn-outline {
    border: 2px solid var(--accent-primary);
    color: var(--text-primary);
    background: transparent;
}
.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-block {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 1.5rem;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

/* Layout Structure */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-right: clamp(280px, 25vw, 350px); /* Flexible width for the sidebar */
    position: relative;
    overflow-x: hidden;
    transition: margin-right var(--transition-medium);
}
.main-content.expanded {
    margin-right: 0;
}

/* Sidebar (Right) */
.sidebar {
    width: clamp(280px, 25vw, 350px);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Changed from overflow-y: auto so hamburger can stick out */
    transition: transform var(--transition-medium);
}
.sidebar.closed {
    transform: translateX(100%);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    padding: 2rem;
    overflow-y: auto;
}

.sidebar .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar .profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
    margin-bottom: 1rem;
    object-fit: cover;
    z-index: 1;
}

.sidebar .profile-name {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    z-index: 1;
}

.sidebar .profile-location {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    z-index: 1;
}

.sidebar-socials {
    margin-top: 0;
    z-index: 1;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-nav .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    list-style: none;
}

.sidebar-nav .nav-links a {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    transition: var(--transition-fast);
    color: var(--text-secondary);
}

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

.hamburger {
    display: flex;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    position: absolute;
    top: 1.5rem;
    left: -50px; /* Attach to the left edge of the sidebar */
    z-index: 1001;
    background: rgba(15, 23, 42, 0.9);
    padding: 10px;
    border-radius: 8px 0 0 8px;
    border: 1px solid var(--glass-border);
    border-right: none;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}
.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: var(--transition-fast);
}
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Typing Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-primary);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 0;
    justify-content: flex-start;
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('placeholder_anime.jpg'); /* User will replace this */
    background-size: cover;
    background-position: center;
    z-index: -2;
    opacity: 0.3;
    filter: brightness(0.6);
}
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
    position: relative;
    z-index: 1;
}
.hero-content {
    flex: 1;
    margin-top: 15vh;
}
.greeting {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}
.hero-actions {
    display: flex;
    gap: 1rem;
}

/* About Section */
.about-panel {
    max-width: 800px;
    margin: 0 auto;
}
.about-panel p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.contact-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.skill-item {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition-medium);
    cursor: pointer;
}
.skill-item:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.skill-item i {
    font-size: 3rem;
}
.skill-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

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

.projects-grid.full-display {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}
.projects-grid.full-display .project-image {
    height: 300px;
}
.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-medium);
}
.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.project-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}
.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .app-screenshot {
    transform: scale(1.05);
}
.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.project-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}
.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}
.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    text-align: center;
}
.footer-content {
    margin-bottom: 2rem;
}
.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}
.footer-logo span {
    color: var(--accent-primary);
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.social-links a {
    font-size: 1.8rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}
.social-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}
.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Services (What I Do) Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.service-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.service-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}
.service-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Experience & Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 1rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}
.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--accent-primary);
    z-index: 1;
}
.timeline-content {
    padding: 1.5rem;
}
.timeline-date {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.timeline-title {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}
.timeline-org {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Categorized Skills */
.skills-category {
    margin-bottom: 3rem;
}
.skills-category:last-child {
    margin-bottom: 0;
}
.category-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: inline-block;
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        margin-right: 0 !important;
    }
    .sidebar {
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .subtitle {
        margin: 0 auto 2rem;
    }
    .hero-content {
        margin-top: 25vh;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }
    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.5rem;
    }
    .projects-grid, .projects-grid.full-display {
        grid-template-columns: 1fr;
    }
}

/* Anime.js Specific Styles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(212, 163, 115, 0.5); /* Warm sand color */
    border-radius: 50%;
}

.follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.follower-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
}

/* Hologram Glowing Border Animation */
@keyframes hologramGlow {
    0% {
        box-shadow: 0 0 5px rgba(212, 163, 115, 0.1), inset 0 0 5px rgba(212, 163, 115, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 163, 115, 0.4), inset 0 0 10px rgba(212, 163, 115, 0.2);
    }
    100% {
        box-shadow: 0 0 5px rgba(212, 163, 115, 0.1), inset 0 0 5px rgba(212, 163, 115, 0.1);
    }
}

.glass-panel:hover, .project-card:hover, .profile-img:hover {
    animation: hologramGlow 2s infinite alternate;
}

/* For Anime.js text splitting */
.hero h1 .char {
    display: inline-block;
    transform-origin: 50% 100%;
}
