/* --- Variables & Setup --- */
:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --link-color: #2563eb;
    --accent-gradient: linear-gradient(135deg, #e0f2fe 0%, #dcfce7 100%);
    --accent-gradient-hover: linear-gradient(135deg, #bae6fd 0%, #bbf7d0 100%);
    --card-bg: #f8fafc;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 856px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

h1, h2, h3, h4 {
    margin-top: 0;
    color: var(--text-primary);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    text-decoration: underline;
}

/* --- Language Switcher --- */
.lang-switch {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 50%;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.lang-switch:hover {
    background: var(--accent-gradient-hover);
    text-decoration: none;
    transform: scale(1.05);
}

/* --- Section 1: Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bento-grid > :last-child {
    grid-column: 1 / -1;
}

.bento-tile {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    background: var(--accent-gradient);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    align-items: flex-start;
    transition: var(--transition);
    gap: 0.5rem;
}

.bento-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.tile-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tile-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tile-icon img {
    font-size: 2rem;
}

.tile-icon h3 {
    font-size: 1rem;
    margin: 0;
    line-height: 1;
}

.bento-tile p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    flex-grow: 1;
}

.bento-btn {
    flex: 0 1 auto;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    z-index: 2;
    background: rgba(255, 255, 255, 1);
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: default;
    transition: var(--transition);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.bento-btn:hover {
    background: var(--accent-gradient-hover);
    text-decoration: none;
}

/* --- Section 2: About Me --- */
#about {
    margin-bottom: 4rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0rem;
}

.social-btn {
    background: rgba(255, 255, 255, 1);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.social-btn:hover {
    background: var(--accent-gradient-hover);
    text-decoration: none;
}

/* --- Section 3: Projects --- */
.project-category {
    margin-bottom: 3rem;
}

.project-category h3 {
    border-bottom: 2px solid var(--card-bg);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-card {
    background: var(--accent-gradient);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.project-links {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Tech Tags & Expansion Logic */
.tech-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tech-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.tech-tag {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: inline-block;
}

.tech-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    /* Set up for JS height calculation */
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: height 0.3s ease-out, opacity 0.3s ease-out, margin-top 0.3s ease-out;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid #f1f5f9;
}

/* --- Responsive Layout --- */
@media (max-width: 620px) {
    .bento-grid {
        grid-template-columns: 1fr; /* Stacks to single column */
    }
}