/* CSS Styles with comments related to HTML structure */
:root {
    /* Root variables for theme colors and font used globally */
    --bg: #03030a;
    --card: rgba(255,255,255,0.04);
    --glass-border: rgba(255,255,255,0.08);
    --accent: rgb(124,247,255);
    --accent-2: rgb(139,92,246);
    --muted: rgba(255,255,255,0.65);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

* {
    box-sizing: border-box; /* Ensure padding and borders are included in element's total width/height */
}

html, body {
    margin: 0;
    min-height: 100vh;
    background: #041022;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #e9f7fb;
}


.container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 20px;
    padding-left: 24px;
    padding-right: 24px;
}

header {
    display: flex;
    justify-content: space-between; /* Align brand to left, navigation to right */
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center; /* Logo and title vertically centered */
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg,var(--accent),var(--accent-2)); /* Gradient for logo box */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #021; /* Dark text inside logo */
}

.title h1 {
    margin: 0;
    font-size: 18px; /* Main title in header */
}

.title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px; /* Subtitle in header */
}

h4 {
    margin-top: 0px;
    margin-bottom: 10px;

}

nav {
    display: flex;
    gap: 12px;
    align-items: center; /* Contains links and language selector */
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600; /* Navigation links */
}

nav select {
    background: transparent;
    color: inherit;
    border: 1px solid var(--glass-border);
    padding: 6px;
    border-radius: 8px; /* Language dropdown */
}

.hero {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
    align-items: stretch;
}

.card.intro, 
.card.visual {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card.visual {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
}

.card {
    background: linear-gradient(180deg,var(--card), rgba(255,255,255,0.02)); /* Glassmorphism card */
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(6px); /* Soft blur effect */
}

.visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro h2 {
    margin: 0; /* Title in hero intro */
}

.meta {
    color: var(--muted);
    font-size: 13px; /* For small descriptive text */
}

.cta {
    display: flex;
    gap: 10px;
    margin-top: 12px; /* Button container below intro */
}

.btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(90deg,var(--accent),var(--accent-2)); /* Primary buttons */
    color: #021;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--glass-border); /* Secondary (outlined) buttons */
    color: var(--muted);
    text-decoration: none;
}

.accent-line {
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg,var(--accent),var(--accent-2)); /* Decorative line in intro */
    box-shadow: 0 8px 40px rgba(124,247,255,0.06);
    margin-top: 20px;
}

#profileImg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.imgToggle {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 0;
    background: rgba(0,0,0,0.35);
    color: #fff; /* Button to toggle image/cube */
    font-weight: 600;
}

.small-note {
    font-size: 13px;
    color: var(--muted); /* For smaller secondary text */
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two-column grid (charts, projects) */
    gap: 20px;
    margin-top: 18px;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Project cards grid */
    gap: 14px;
}

.project {
    padding: 12px;
    border-radius: 10px; /* Individual project item */
}

.chart {
    width: 100%;
    max-height: 260px; /* Canvas for charts (Chart.js) */
}

.skill {
    display: flex;
    align-items: center;
    gap: 12px; /* Skill bar container */
}

.skill .name {
    width: 100px;
    color: var(--muted); /* Skill name text */
}

.skill .bar {
    flex: 1;
    height: 10px;
    border-radius: 99px;
    background: rgba(255,255,255,0.04); /* Background of progress bar */
    overflow: hidden;
}

.skill .bar > i {
    display: block;
    height: 100%;
    border-radius: 99px;
}

/* Swift – red */
.skill.swift .bar > i {
    background: #ff3b3b; /* red */
}

/* HTML – orange */
.skill.html .bar > i {
    background: #ff7f00; /* orange */
}

/* CSS – violette */
.skill.css .bar > i {
    background: #7851A9; /* violette */
}

/* JavaScript – yellow */
.skill.js .bar > i {
    background: #ffd500; /* yellow */
}

/* Python – deep blue */
.skill.python .bar > i {
    background: #4B8BBE; /* blue (deep) */
}

/* PineScript – green */
.skill.pine .bar > i {
    background: #34c759; /* green */
}

#skillsChart {
  width: 100%;
  height: auto;
  display: block;
}


.contact-card {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center; /* Wrapper for contact section in footer */
}

.contacts {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
}

.contacts a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
}

.contacts a:hover {
    text-decoration: underline;
}


.contact-card form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 720px;
}

.contact-card input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: inherit;
}

@media (max-width: 600px) {
    .contact-card form {
        flex-direction: column;
        align-items: stretch; 
    }

    .contact-card input,
    .contact-card button {
        width: 100%;
    }
}


footer .small {
    color: var(--muted);
    font-size: 13px; /* Footer small text */
}

/* Responsive Design */
@media (max-width:700px) {
    .hero {
        grid-template-columns: 1fr; /* Stack hero intro and visual vertically */
    }
    .grid-2 {
        grid-template-columns: 1fr; /* Stack charts/projects */
    }
    .projects {
        grid-template-columns: 1fr; /* Single column projects */
    }
}

@media (max-width: 520px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

@media (max-width: 700px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

    #profileImg {
        width: 100%;
        height: auto;
        max-width: 280px;
        max-height: 350px;
    }
}

@media (max-width: 600px) {
    .contact-card form {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 450px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero {
        margin: 0;
        width: 100%;
    }

    #profileImg {
        max-width: 220px;
        max-height: 300px;
    }

    .cta {
        flex-direction: column;
        align-items: stretch;
    }

    .cta .btn {
        width: 100%;
        text-align: center;
    }
}
