:root {
    /* Color Palette - Dark Theme */
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;

    --accent-primary: #06b6d4;
    /* Cyan 500 */
    --accent-hover: #22d3ee;
    /* Cyan 400 */

    --border-color: #334155;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Comfortaa', cursive;

    /* Spacing */
    --container-width: 1200px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

/* Header / Hero */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 2rem;
}

.lang-switch {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 0.9rem;
    z-index: 10;
}

.lang-switch a {
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 0.5rem;
}

.lang-switch a.active {
    color: var(--accent-primary);
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    object-fit: cover;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

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

.social-icon {
    font-size: 2rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.social-icon:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* Badges */
.badge-group {
    /* Replaces tryhackme absolute positioning */
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

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

.project-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.project-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    /* Pushes tags to bottom if needed, or buttons */
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--accent-primary);
    border-radius: 999px;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    margin-top: auto;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Education List */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edu-item {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
}

.edu-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.edu-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Section Types */
h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

h2 span.count {
    font-size: 1rem;
    color: var(--text-muted);
    vertical-align: middle;
    margin-left: 0.5rem;
    font-weight: normal;
}

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }
}

.experience-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.experience-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all 0.2s ease;
    border-left: 4px solid var(--accent-primary);
}

.experience-card:hover {
    transform: translateX(5px);
    background-color: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-role {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.experience-period {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 600;
    white-space: nowrap;
    background: rgba(6, 182, 212, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
}

.experience-company {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.client-name {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
    opacity: 0.8;
}

.experience-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

@media (max-width: 600px) {
    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .experience-period {
        align-self: flex-start;
    }
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
}

.service-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: block;
}

.service-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.service-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Clients Section */
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.client-item {
    background: var(--bg-card-hover);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.client-item:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(6, 182, 212, 0.05);
}

/* Client Grouping */
.client-group {
    margin-bottom: 3rem;
}

.client-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.client-link {
    font-size: 1rem;
    color: var(--text-muted);
}


.client-link:hover {
    color: var(--accent-primary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-primary);
    color: #fff;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 0.8;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 8px 16px rgba(6, 182, 212, 0.4);
    opacity: 1;
}

.back-to-top:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1rem;
    }
}