/* ==========================================================
   design.css — layered on top of style.css
   Adds: section polish, category skills, timeline experience,
   redesigned education, thumbnail certificates + lightbox,
   dark-mode logo swap, quick-facts grid in About.
   ========================================================== */

/* ---------- Theme tokens ---------- */
:root {
    --ink: #0f172a;
    --ink-2: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --card-bg: #ffffff;
    --page-bg: #f8fafc;
    --accent: #4070f4;
    --accent-2: #6366f1;
    --success: #10b981;
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, .06);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
    --radius: 14px;
}
body { background: var(--page-bg); }
body.darkskin {
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --line: #334155;
    --card-bg: #1e293b;
    --page-bg: #0f172a;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
}
body.darkskin { background: var(--page-bg) !important; color: var(--ink); }
body.darkskin header { border-bottom: 1px solid var(--line); }

/* ---------- Logo swap for dark mode ---------- */
.logo .logo-dark { display: none; }
body.darkskin .logo .logo-light { display: none; }
body.darkskin .logo .logo-dark { display: inline-block; }

/* ---------- Section spacing and heading ---------- */
main { padding: 0 20px; }
#About, #Skills, #experience, #education, #Projects, #Certificates, #GithubStats, #Contact {
    padding: 70px 0 40px;
    scroll-margin-top: 100px;
}
.heading h2 {
    letter-spacing: 6px !important;
}

/* ---------- HOME hero polish ---------- */
#Home { padding: 40px 0; }
#Home h2 { color: var(--ink); }
body.darkskin #Home h2 { color: var(--ink); }

/* ---------- ABOUT — LinkedIn-style intro + quick facts ---------- */
#About .about_row {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 30px auto 0;
    align-items: start;
}
#About .profileImg {
    min-width: unset !important;
    text-align: center;
    position: sticky;
    top: 100px;
}
#About .profileImg > img {
    width: 280px !important;
    height: 280px !important;
    border-radius: 50%;
    border: 4px solid var(--card-bg) !important;
    box-shadow: var(--shadow-lg) !important;
    object-fit: cover;
}
#About .introduction {
    max-width: 720px !important;
    padding: 0 !important;
}
#About .introduction p {
    font-size: 16.5px !important;
    line-height: 1.75 !important;
    color: var(--ink-2);
    margin-bottom: 16px;
    text-align: left !important;
}
#About .introduction p:first-child {
    font-size: 20px !important;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 20px;
}
#About .quick-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}
#About .quick-facts .fact {
    background: var(--card-bg);
    padding: 20px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--line);
    transition: transform .2s ease, box-shadow .2s ease;
}
#About .quick-facts .fact:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
#About .quick-facts .fact .num {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}
#About .quick-facts .fact .lbl {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- SKILLS — category groups ---------- */
#Skills .skill-groups {
    max-width: 1200px;
    margin: 30px auto 0;
    display: grid;
    gap: 30px;
}
#Skills .skill-group {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 30px;
    box-shadow: var(--shadow-sm);
}
#Skills .skill-group h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
}
#Skills .skill-group h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 3px;
}
#Skills .skill-group .tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}
#Skills .skill-group .tech-row .tech {
    background: var(--page-bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    box-shadow: none !important;
}
body.darkskin #Skills .skill-group .tech-row .tech {
    background: #0f172a;
}
#Skills .skill-group .tech-row .tech:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--accent);
}
#Skills .skill-group .tech-row .tech img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* Kill the old grid layout since we replaced it */
#Skills .technology { display: none; }

/* ---------- EXPERIENCE — vertical timeline ---------- */
#experience .timeline {
    max-width: 900px;
    margin: 30px auto 0;
    position: relative;
    padding-left: 40px;
}
#experience .timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
}
#experience .exp-item {
    position: relative;
    margin-bottom: 36px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 26px 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: transform .2s ease, box-shadow .2s ease;
}
#experience .exp-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}
#experience .exp-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 30px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 4px var(--page-bg);
}
#experience .exp-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}
#experience .exp-role {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}
#experience .exp-date {
    background: var(--page-bg);
    color: var(--muted);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--line);
}
#experience .exp-company {
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 14px;
}
#experience .exp-desc {
    color: var(--ink-2);
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 14.5px;
}
#experience .exp-bullets {
    padding-left: 18px;
    margin: 10px 0 16px;
}
#experience .exp-bullets li {
    color: var(--ink-2);
    line-height: 1.65;
    margin-bottom: 6px;
    font-size: 14px;
}
#experience .exp-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}
#experience .exp-stack .chip {
    background: rgba(64, 112, 244, 0.08);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(64, 112, 244, 0.2);
}
body.darkskin #experience .exp-stack .chip {
    background: rgba(64, 112, 244, 0.15);
    color: #93c5fd;
}

/* ---------- EDUCATION — horizontal cards with icons ---------- */
#education .edu-grid {
    max-width: 1100px;
    margin: 30px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
#education .edu-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
#education .edu-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
#education .edu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}
#education .edu-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(64, 112, 244, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 18px;
}
#education .edu-degree {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
    line-height: 1.3;
}
#education .edu-school {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}
#education .edu-year {
    display: inline-block;
    background: var(--page-bg);
    color: var(--muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--line);
    margin-bottom: 14px;
}
#education .edu-note {
    color: var(--ink-2);
    line-height: 1.65;
    font-size: 14px;
}

/* ---------- PROJECTS polish (small tweaks, keep card design) ---------- */
#Projects .projects_row .card {
    background: var(--card-bg);
    border: 1px solid var(--line);
    transition: transform .2s ease, box-shadow .2s ease;
}
#Projects .projects_row .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
#Projects .projects_row .card .description p {
    color: var(--ink-2);
}
body.darkskin #Projects .projects_row .card .description p,
body.darkskin #Projects .projects_row .card .description h2 {
    color: var(--ink);
}

/* ---------- CERTIFICATES — thumbnail grid + lightbox ---------- */
#Certificates .cert-grid {
    max-width: 1100px;
    margin: 30px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
#Certificates .cert-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    cursor: zoom-in;
    transition: transform .25s ease, box-shadow .25s ease;
}
#Certificates .cert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
#Certificates .cert-thumb {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: var(--page-bg);
}
#Certificates .cert-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
#Certificates .cert-card:hover .cert-thumb img {
    transform: scale(1.05);
}
#Certificates .cert-thumb::after {
    content: '\f065';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity .2s ease;
}
#Certificates .cert-card:hover .cert-thumb::after { opacity: 1; }
#Certificates .cert-info {
    padding: 16px 18px;
}
#Certificates .cert-info h3 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
    line-height: 1.35;
}
#Certificates .cert-info p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .95);
    z-index: 999999;
    padding: 40px 20px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeIn .2s ease;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 92%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    background: #fff;
}
.lightbox .caption {
    color: #f1f5f9;
    margin-top: 18px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    max-width: 700px;
}
.lightbox .close {
    position: absolute;
    top: 24px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .2);
    transition: background .2s ease;
}
.lightbox .close:hover { background: rgba(255, 255, 255, .2); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- GITHUB STATS ---------- */
#GithubStats { padding-bottom: 60px; }
body.darkskin #GithubStats .gitstat_row img { border-radius: 10px; }

/* ---------- CONTACT polish ---------- */
#Contact .contact_row {
    max-width: 1100px;
    margin: 30px auto 0;
    align-items: stretch;
}
#Contact .contact_details {
    background: var(--card-bg);
    padding: 32px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
#Contact .contact_details h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
}
#Contact .contact_details .lead {
    color: var(--ink-2);
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 24px;
}
#Contact .contact_details .info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
#Contact .contact_details .info-row:last-child { border-bottom: none; }
#Contact .contact_details .info-row .icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(64, 112, 244, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
#Contact .contact_details .info-row .info-text {
    color: var(--ink-2);
    font-size: 14.5px;
    word-break: break-word;
}
#Contact .contact_details .info-row .info-text a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
#Contact .contact_details .info-row .info-text a:hover {
    color: var(--accent);
}
#Contact .contact_form {
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--line);
    background: var(--card-bg) !important;
}
body.darkskin #Contact .contact_form label { color: var(--ink); }

/* ---------- FOOTER polish ---------- */
footer .footerbar { background: #0f172a; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    #About .about_row { grid-template-columns: 1fr; text-align: center; }
    #About .profileImg { position: static; }
    #About .profileImg > img { width: 200px !important; height: 200px !important; }
    #About .introduction p { text-align: left !important; }
    #About .quick-facts { grid-template-columns: repeat(2, 1fr); }
    #experience .timeline { padding-left: 30px; }
    #experience .exp-item::before { left: -26px; }
    #Skills .skill-group { padding: 22px 20px; }
    #Skills .skill-group .tech-row .tech { width: 74px; height: 74px; padding: 10px; }
}
@media (max-width: 500px) {
    #About .quick-facts { grid-template-columns: 1fr 1fr; }
    #experience .exp-head { flex-direction: column; align-items: flex-start; }
    .heading h2 { font-size: 22px !important; letter-spacing: 3px !important; }
}
