:root {
    --primary-color: #ffb7b2; /* Pastel Pink / Sakura */
    --secondary-color: #e2f0cb; /* Pastel Green */
    --accent-color: #ff9a9e; /* Darker Pink */
    --bg-color: #fffaf0; /* Warm White */
    --text-primary: #5c4b51; /* Soft Dark Brown/Grey */
    --text-secondary: #8c7a80;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 1);
    --shadow: 0 8px 32px 0 rgba(255, 183, 178, 0.2);
    
    /* Fonts */
    --font-heading: 'Kosugi Maru', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 183, 178, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(226, 240, 203, 0.3) 0%, transparent 50%);
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
}

/* Canvas for Sakura */
#sakura-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Utils */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1.5rem; }

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--glass-border);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
}

.logo span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.nav-links li a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Bento Grid Layout */
.bento-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
    max-width: 1200px;
    margin: 100px auto 40px;
    padding: 0 20px;
}

.bento-box {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    padding: 35px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.bento-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px 0 rgba(255, 183, 178, 0.3);
}

.box-title {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    border-bottom: 2px dashed var(--primary-color);
    padding-bottom: 8px;
    display: inline-block;
}

.box-title span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

/* Grid Assignments */
.hero-box { 
    grid-column: span 2; 
    grid-row: span 2; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
}
.about-box { 
    grid-column: span 2; 
    grid-row: span 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.edu-box { 
    grid-column: span 2; 
    grid-row: span 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.skills-box { 
    grid-column: span 4; 
    grid-row: span 2; 
}
.exp-box { 
    grid-column: span 2; 
    grid-row: span 2; 
}

/* Hero Content */
.avatar-container {
    width: 130px;
    height: 130px;
    margin: 0 auto 15px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
}

.greeting {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.hero-box h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 5px;
}

.nickname {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.role {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.btn {
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    display: inline-block;
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
}

.primary-btn:hover {
    background-color: #ff858a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.6);
}

.secondary-btn {
    background-color: white;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.secondary-btn:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Timeline/Experience */
.timeline-item h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.timeline-item h4 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-top: 5px;
}

.timeline-item .date {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.timeline-item ul {
    margin-left: 15px;
    font-size: 0.9rem;
}

.timeline-item li {
    margin-bottom: 4px;
}

.view-company {
    margin-top: 15px;
    padding: 6px 15px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Skills - Interactive Papers */
.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .skills-wrapper {
        flex-direction: row;
        justify-content: space-around;
        gap: 20px;
    }
    .skill-category {
        flex: 1;
    }
}

.skill-category h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.paper-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 15px;
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.03);
    min-height: 120px;
    position: relative;
    border: 1px dashed rgba(255, 154, 158, 0.4);
}

.paper-tag {
    background: #fffdf8;
    border: 1px solid #e5dfd3;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    transform: rotate(var(--r));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 2px 3px 6px rgba(0,0,0,0.08);
    cursor: default;
    position: relative;
    border-radius: 2px;
}

.paper-tag::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.paper-tag:hover {
    transform: translateY(-15px) rotate(0deg) scale(1.1);
    box-shadow: 5px 15px 25px rgba(0,0,0,0.15);
    z-index: 10;
    background: #ffffff;
    color: var(--accent-color);
}

.tech-paper {
    background: #f8fff9;
}
.tech-paper:hover {
    color: #7b9e59;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-weight: 700;
}

/* Vibe Coder Section */
.section-divider {
    text-align: center;
    margin: 80px 0 20px;
}

.section-divider h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
}

.section-divider p {
    color: var(--text-secondary);
    font-weight: 700;
}

.cyber-glitch {
    position: relative;
    display: inline-block;
    font-family: var(--font-heading);
}
.cyber-glitch::before, .cyber-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.cyber-glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--primary-color);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.cyber-glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--secondary-color);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(21px, 9999px, 83px, 0); }
    20% { clip: rect(61px, 9999px, 47px, 0); }
    40% { clip: rect(100px, 9999px, 14px, 0); }
    60% { clip: rect(19px, 9999px, 83px, 0); }
    80% { clip: rect(69px, 9999px, 54px, 0); }
    100% { clip: rect(12px, 9999px, 81px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(21px, 9999px, 83px, 0); }
    20% { clip: rect(61px, 9999px, 47px, 0); }
    40% { clip: rect(100px, 9999px, 14px, 0); }
    60% { clip: rect(19px, 9999px, 83px, 0); }
    80% { clip: rect(69px, 9999px, 54px, 0); }
    100% { clip: rect(12px, 9999px, 81px, 0); }
}

/* Cyber Pastel Container */
.cyber-pastel-container {
    margin-top: 20px;
}
.cyber-pastel-container .bento-box {
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(255, 154, 158, 0.4);
    box-shadow: 0 8px 32px 0 rgba(255, 154, 158, 0.15);
    background-image: linear-gradient(rgba(255, 183, 178, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 183, 178, 0.1) 1px, transparent 1px);
    background-size: 20px 20px; /* Grid background inside box */
}

.cyber-pastel-container .bento-box:hover {
    box-shadow: 0 15px 40px 0 rgba(255, 154, 158, 0.25);
    border-color: rgba(255, 154, 158, 0.8);
}

.cyber-title {
    color: var(--accent-color);
    border-bottom-color: var(--primary-color);
}

.omniglot-box {
    grid-column: span 4;
}

.portfolio-box {
    grid-column: span 4;
}

.omniglot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 20px;
}

.cyber-tag {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 154, 158, 0.5);
    padding: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-color);
    transition: all 0.3s;
    cursor: default;
    box-shadow: 0 2px 10px rgba(255, 154, 158, 0.1);
    position: relative;
    overflow: hidden;
}

.cyber-tag::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 154, 158, 0.2), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.5s ease;
}

.cyber-tag:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.cyber-tag:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 154, 158, 0.4);
    transform: translateY(-3px);
}

.cyber-tag i {
    font-size: 3.5rem;
    color: var(--accent-color);
    z-index: 1;
    transition: color 0.3s;
}

.cyber-tag:hover i {
    color: white;
}

.cyber-tag i[class*="original"] {
    /* Convert any original color to black, then to pink (#ff9a9e) */
    filter: brightness(0) saturate(100%) invert(64%) sepia(33%) saturate(579%) hue-rotate(300deg) brightness(105%) contrast(101%);
}

.cyber-tag:hover i[class*="original"] {
    filter: brightness(0) invert(1);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 154, 158, 0.3);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 154, 158, 0.2);
}

.portfolio-img-placeholder {
    width: 100%;
    height: 200px;
    background: #fffdf8;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 15px;
    border: 2px dashed rgba(255, 154, 158, 0.5);
}

.portfolio-item h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.portfolio-item p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.cyber-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 8px 20px;
    border-radius: 8px;
    display: inline-block;
}

.cyber-btn:hover {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px rgba(255, 154, 158, 0.4);
}

/* Responsive */
@media screen and (max-width: 992px) {
    .bento-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-box { grid-column: span 2; }
    .about-box { grid-column: span 2; }
    .edu-box { grid-column: span 2; }
    .skills-box { grid-column: span 2; }
    .exp-box { grid-column: span 2; grid-row: span 1;}
    .omniglot-box { grid-column: span 2; }
    .portfolio-box { grid-column: span 2; }
}

@media screen and (max-width: 600px) {
    .bento-container {
        grid-template-columns: 1fr;
    }
    .hero-box, .about-box, .edu-box, .skills-box, .exp-box, .omniglot-box, .portfolio-box {
        grid-column: span 1;
    }
    .glass-nav {
        padding: 15px 20px;
    }
}
