*, *::before, *::after {
    box-sizing: border-box; 
}

:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --btn-text-color: #121212;
    --card-bg: #1e1e1e;
    --border-radius: 12px;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.3);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

header {
    text-align: center;
    margin: 0 auto 4rem auto;
}

h1 { 
    font-size: 2.5rem; 
    margin-bottom: 0.2rem; 
    color: #ffffff;
    font-weight: 700;
}

h2 { 
    font-size: 1.5rem; 
    margin-top: 0; 
    border-bottom: 1px solid #333; 
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-weight: 500;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 0;
    color: #cccccc;
}

.bio { 
    opacity: 0.9; 
    margin-bottom: 1.5rem; 
}

.focus-areas {
    font-size: 0.95rem;
    color: #aaaaaa;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.focus-areas strong {
    color: var(--accent-color);
    margin-right: 8px;
}

a { 
    color: var(--accent-color); 
    text-decoration: none; 
    font-weight: 500; 
    transition: opacity 0.2s;
}

a:hover { 
    text-decoration: underline; 
    opacity: 0.8;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
}

.icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    filter: invert(1); 
}

.tag-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.btn {
    background-color: var(--accent-color);
    color: var(--btn-text-color) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn .icon {
    filter: invert(0);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-category {
    color: #888;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1.2rem;
}

.tech-node {
    position: relative;
    background-color: var(--card-bg);
    width: 100px;
    height: 100px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}

.tech-node::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent-color), #6200ea);
    z-index: -1;
    border-radius: 18px;
    opacity: 0.2;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.tech-node.visible {
    opacity: 1;
    transform: translateY(0);
}

.tech-node:hover {
    transform: translateY(-8px) scale(1.05);
}

.tech-node:hover::before {
    opacity: 1;
    filter: blur(4px);
}

.tech-node i { font-size: 3rem; }
.custom-icon { width: 3rem; height: 3rem; object-fit: contain; }

.tech-node span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    position: relative; /* REQUIRED for the absolute BTH logo */
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.2s ease;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.project-visual {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
}

.project-content {
    flex-grow: 1;
}

.project-card h3 { 
    margin-top: 0; 
    margin-bottom: 0.5rem; 
    color: #ffffff;
}

.project-card p {
    margin-bottom: 1rem;
    margin-top: 0;
}

.tags { 
    display: flex; 
    gap: 0.5rem; 
    flex-wrap: wrap; 
}

.tag { 
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem; 
    padding: 0.3rem 0.8rem; 
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 20px;
    color: #e0e0e0; 
    font-weight: 500; 
    transition: all 0.2s ease; 
    cursor: default;
}

.tag i { font-size: 1.1rem; }

.tag:hover {
    color: var(--accent-color);
    background: rgba(187, 134, 252, 0.1);
    border-color: var(--accent-color);
}

/* --- Education Logo Styles --- */
.education-card .project-content {
    padding-right: 3rem; /* Gives the text room so it doesn't run into the logo */
}

.education-logo {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 60px;
    height: auto;
    opacity: 0.3; /* Keeps it discrete */
    transition: opacity 0.3s ease;
    pointer-events: none; /* Prevents it from interfering with text highlighting */
}

.education-card:hover .education-logo {
    opacity: 0.7; /* Brightens up slightly when hovering over the card */
}

.contact-section { text-align: center; }

.contact-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: inline-block;
    transition: transform 0.2s ease;
}

.contact-card:hover { transform: translateY(-2px); }

.email-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-email {
    font-size: 1.2rem;
    font-weight: 700;
    word-break: break-all;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.contact-email:hover {
    text-decoration: none;
    border-bottom-color: var(--accent-color);
    opacity: 0.8;
}

.copy-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.copy-btn .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

footer {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #222;
    padding-top: 2rem;
    margin-top: 4rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .container { padding: 2rem 1.5rem; }
    h1 { font-size: 2rem; }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-visual {
        width: 100%;
        height: 120px;
    }
    
    .education-card .project-content {
        padding-right: 0; 
    }

    .education-logo {
        width: 45px;
        top: 1rem;
        right: 1rem;
    }
}
