/* ==============================
   THEME VARIABLES
============================== */
:root {
    --bg-color: #ffffff;
    --bg-alt: #f0f0f0;
    --bg-soft: #f7f7f7;
    --text-color: #000000;
    --text-muted: #666666;
    --border-color: rgba(0, 0, 0, 0.1);
    --accent-color: #000000;
    --shadow-soft: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Dark theme override */
[data-theme="dark"] {
    --bg-color: #050509;
    --bg-alt: #111111;
    --bg-soft: #18181b;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.12);
    --accent-color: #f9fafb;
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.5);
    --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* ==============================
   GLOBAL
============================== */

/* Safer base state for reveal elements:
   - visible by default (so content like "Recent Projects" always shows)
   - you can add .hidden from JS if you want entrance animations
*/
.reveal {
    opacity: 1;
    transform: none;
    transition: 0.6s ease;
}

.reveal.hidden {
    opacity: 0;
    transform: translateY(20px);
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==============================
   HEADER
============================== */
header {
    background: var(--bg-color);
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

header nav {
    display: flex;
    align-items: center;
}

header nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-color);
}

/* theme toggle button (JS creates it) */
#themeToggle {
    margin-left: 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#themeToggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

/* used on mobile when menu is open */
header nav.active {
    display: flex;
}

/* ==============================
   HERO
============================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 10%;
    background: linear-gradient(to right, var(--bg-color), var(--bg-alt));
}

.hero img {
    width: 370px;
    border-radius: 10mm;
    max-width: 100%;
}

.hero .hero-text {
    max-width: 50%;
    text-align: left;
}

.hero h1 {
    font-size: 102px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
}

.role {
    font-size: 24px;
    color: var(--text-color);
    font-weight: 600;
    margin-top: 20px;
}

/* ==============================
   SECTIONS / LAYOUT
============================== */
.section {
    padding: 60px 10%;
    background: var(--bg-color);
    margin: 20px 0;
    box-shadow: var(--shadow-soft);
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
    color: var(--text-color);
}

.projects,
.skills,
.workstation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.certifications {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    text-align: center;
}

/* ==============================
   CARDS (Project / Skill / Work / Certificate)
============================== */
.project,
.skill,
.work-item,
.certificate {
    background: var(--bg-alt);
    box-shadow: var(--shadow-soft);
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 auto;
    width: calc(100% / 3 - 20px);
    margin-right: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover,
.skill:hover,
.work-item:hover,
.certificate:hover,
.education .education-card:hover,
.contact-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-strong);
}

.project img,
.work-item img,
.certificate img {
    width: 100%;
    height: auto;
}

.project .content,
.skill .content,
.work-item .content,
.certificate .content {
    padding: 20px;
}

.project h3,
.skill h3,
.work-item h3,
.certificate h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.project p,
.skill p,
.work-item p,
.certificate p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Project links */
.project a {
    display: inline-block;
    text-decoration: none;
    color: var(--accent-color);
    font-weight: bold;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid var(--accent-color);
    margin: 5px;
}

.project a:hover {
    color: var(--bg-color);
    background-color: var(--accent-color);
}

/* ==============================
   CONTACT
============================== */
.contact {
    text-align: center;
    padding: 60px 10%;
    background: linear-gradient(to right, var(--bg-alt), var(--bg-soft));
}

.contact h2 {
    margin-bottom: 40px;
    font-size: 36px;
    color: var(--text-color);
}

.contact .contact-card {
    background-color: var(--bg-alt);
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.contact .contact-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.contact .contact-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 5px 0;
}

.contact .contact-card .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.contact .contact-card .contact-item ion-icon {
    margin-right: 10px;
    color: var(--accent-color);
}

/* Links inside contact cards – inherit theme colors */
.contact-link {
    color: inherit;
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

/* Ensure link color is white in dark theme */
[data-theme="dark"] .contact-link {
    color: #ffffff !important;
}

/* ==============================
   VISION / PROGRESS BARS
============================== */
.vision {
    padding: 60px 10%;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 20px 0;
    box-shadow: var(--shadow-soft);
}

.vision h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
}

.vision .skill-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.vision .skill-wrapper .skill-label {
    width: 25%;
    font-size: 18px;
}

.vision .progress-container {
    width: 70%;
    background-color: var(--bg-alt);
    border-radius: 13px;
    overflow: hidden;
}

.vision .progress-container .progress-bar {
    height: 20px;
    border-radius: 13px;
    background-color: var(--accent-color);
    text-align: right;
    line-height: 20px;
    color: var(--bg-color);
    padding-right: 5px;
    box-sizing: border-box;
    transition: width 1s ease-in-out;
}

/* ==============================
   EDUCATION
============================== */
.education {
    padding: 60px 10%;
    background: var(--bg-color);
    margin: 20px 0;
    box-shadow: var(--shadow-soft);
}

.education h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
    color: var(--text-color);
}

.education .education-card {
    background-color: var(--bg-alt);
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Education icon & timeline styling */
.education {
    position: relative;
}

.edu-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.edu-icon ion-icon {
    font-size: 20px;
}

.education-card {
    position: relative;
    padding-left: 20px;
    margin-left: 10px;
}

.education-card::before {
    content: "";
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 2px;
    opacity: 0.15;
}

.education-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.education-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 5px 0;
}

.education-card .date {
    font-size: 12px;
    color: #999999;
}

/* ==============================
   CERTIFICATIONS
============================== */
.certifications .filter-buttons {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* modern pill buttons */
.filter-buttons .button-28 {
    appearance: none;
    background: var(--bg-color);
    border: 1.8px solid var(--accent-color);
    border-radius: 50px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--accent-color);
    letter-spacing: 0.3px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.filter-buttons .button-28:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
}

.filter-buttons .button-28.active {
    background: var(--accent-color) !important;
    color: var(--bg-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
}

.certifications .certificate {
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.certifications .certificate:hover {
    transform: scale(1.05);
}

/* ==============================
   HAMBURGER (MOBILE)
============================== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 4px 0;
}

/* ==============================
   ABOUT / SERVICES GRID
============================== */
#about .skills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* override global .skill sizing in this section */
#about .skill {
    width: auto;
    margin-right: 0;
}

/* Service card styling */
.service-card {
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 22px 20px;
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.service-icon ion-icon {
    font-size: 20px;
}

#about .service-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-color);
}

#about .service-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* YouTube link inside services */
.yt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    padding-bottom: 2px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.yt-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--text-color);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.yt-link ion-icon {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.yt-link:hover {
    transform: translateX(2px);
    color: var(--text-color);
}

.yt-link:hover::after {
    transform: scaleX(1);
}

.yt-link:hover ion-icon {
    transform: scale(1.1);
}

/* CTA under services */
.services-cta {
    margin-top: 40px;
    text-align: center;
}

.services-cta p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* primary button */
.btn-primary {
    appearance: none;
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--bg-color);
    cursor: pointer;
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 26px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    user-select: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* subtle pulse for services button */
.services-btn {
    animation: subtlePulse 2.4s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    50% {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    }
}

/* ==============================
   RESEARCH SECTION
============================== */
#research .research-card {
    background: var(--bg-soft);
    padding: 22px 24px;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    margin-top: 20px;
    transition: all 0.3s ease;
}

#research .research-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

#research h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

#research p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 6px 0;
}

/* View Publication Button */
.research-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--accent-color);
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.research-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* ==============================
   YOUTUBE CARD ACCENTS
============================== */
.youtube-card {
    border-left: 4px solid #ff0000;
}

.yt-icon {
    color: #ff0000 !important;
    font-size: 20px;
}

.yt-preview {
    margin-top: 12px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.youtube-card:hover .yt-preview {
    transform: scale(1.02);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.yt-follow-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #ff0000;
    color: #ff0000;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.yt-follow-btn:hover {
    background: #ff0000;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==============================
   AWARD CARD
============================== */
.award-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-soft) 100%);
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
    margin: 18px 0;
    position: relative;
    overflow: visible;
    transition: transform 220ms ease, box-shadow 220ms ease;
    max-width: 980px;
}

/* left trophy accent */
.award-card::before {
    content: "🏆";
    position: absolute;
    left: -10px;
    top: 12px;
    font-size: 34px;
    transform: rotate(-8deg);
    opacity: 0.9;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.award-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.1);
}

.award-thumb {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: linear-gradient(135deg, var(--bg-color), var(--bg-soft));
    box-shadow: inset 0 -4px 12px rgba(0, 0, 0, 0.02);
}

.award-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.award-meta {
    padding: 4px 2px 4px 0;
}

.award-meta h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    letter-spacing: -0.2px;
    color: var(--text-color);
}

.award-meta p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.award-badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
}

.award-pill {
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2px;
}

/* entry animation */
@keyframes awardPop {
    from { transform: translateY(14px) scale(.99); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.award-card { animation: awardPop 420ms cubic-bezier(.2,.9,.2,1) both; }

/* ==============================
   LIGHTBOX
============================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* ==============================
   RESPONSIVE
============================== */
@media only screen and (max-width: 768px) {
    header {
        padding: 10px 5%;
    }

    header .logo {
        font-size: 20px;
    }

    header nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-color);
        position: absolute;
        top: 60px;
        left: 0;
        box-shadow: var(--shadow-soft);
    }

    header nav.active {
        display: flex;
    }

    header nav a {
        margin: 10px 0;
        font-size: 14px;
        text-align: center;
    }

    header .hamburger {
        display: flex;
    }

    .hero {
        flex-direction: column;
        align-items: center;
        padding: 60px 5%;
    }

    .hero .hero-text {
        max-width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 58px;
    }

    .hero p,
    .role {
        font-size: 16px;
    }

    .section {
        padding: 40px 5%;
    }

    .section h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .projects,
    .skills,
    .workstation {
        flex-direction: column;
        align-items: center;
    }

    .project,
    .skill,
    .work-item,
    .certificate {
        width: 90%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .certifications .filter-buttons .button-28 {
        width: calc(50% - 10px);
        margin-bottom: 10px;
        font-size: 12px;
        padding: 10px 16px;
        min-height: auto;
        min-width: auto;
        box-sizing: border-box;
    }

    #about .skills {
        grid-template-columns: 1fr;
    }

    .award-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .award-thumb {
        width: 100%;
        height: 220px;
        border-radius: 10px;
    }

    .award-card::before {
        left: 10px;
        top: 8px;
        font-size: 28px;
        transform: rotate(0);
    }
}

@media only screen and (max-width: 992px) {
    #about .skills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
