@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ===== GLOBAL VARIABLES ===== */
:root {
    --bg-color: #0a0f1c;
    --second-bg-color: #121a2b;
    --surface-color: rgba(18, 26, 43, 0.84);
    --surface-strong: #18243a;
    --text-color: #f5f7fb;
    --muted-text: #b5c0d4;
    --main-color: #ff9f1c;
    --main-color-soft: rgba(255, 159, 28, 0.18);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.22);
    --shadow-strong: 0 22px 60px rgba(0, 0, 0, 0.34);
    --container-width: 1120px;
    --radius-sm: 1.2rem;
    --radius-md: 2rem;
    --radius-lg: 2.8rem;
}

body.light-mode {
    --bg-color: #f7f8fc;
    --second-bg-color: #ffffff;
    --surface-color: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --text-color: #182033;
    --muted-text: #556176;
    --main-color: #ff9f1c;
    --main-color-soft: rgba(255, 159, 28, 0.14);
    --border-color: rgba(24, 32, 51, 0.08);
    --shadow-soft: 0 18px 40px rgba(31, 42, 68, 0.08);
    --shadow-strong: 0 24px 58px rgba(31, 42, 68, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    scroll-padding-top: 9.5rem;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 159, 28, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(90, 175, 255, 0.12), transparent 22%),
        linear-gradient(180deg, #0a0f1c 0%, var(--bg-color) 55%, #060911 100%);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

body.light-mode {
    background:
        radial-gradient(circle at top left, rgba(255, 159, 28, 0.15), transparent 28%),
        radial-gradient(circle at top right, rgba(79, 149, 255, 0.14), transparent 22%),
        linear-gradient(180deg, #fdfefe 0%, var(--bg-color) 55%, #eef2f8 100%);
}

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

a {
    color: inherit;
}

section {
    min-height: auto;
    width: min(100%, var(--container-width));
    margin: 0 auto;
    padding: 9.6rem 1.8rem 2.4rem;
}

span {
    color: var(--main-color);
}

.heading {
    font-size: clamp(3.2rem, 7vw, 5rem);
    text-align: center;
    margin-bottom: 3.2rem;
    letter-spacing: -0.03em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-height: 4.8rem;
    padding: 1.2rem 2.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--main-color), #ffbf69);
    color: #111827;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 14px 32px rgba(255, 159, 28, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(255, 159, 28, 0.28);
}

.btn:focus-visible,
.navbar a:focus-visible,
.social-icons a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--main-color);
    outline-offset: 4px;
}

/* ===== HEADER & NAVBAR ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.4rem 1.8rem;
    backdrop-filter: blur(20px);
    background: rgba(10, 15, 28, 0.74);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.light-mode header {
    background: rgba(247, 248, 252, 0.86);
    border-bottom-color: rgba(24, 32, 51, 0.08);
}

.header.sticky {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.logo {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.navbar {
    position: absolute;
    top: calc(100% + 1rem);
    left: 1.8rem;
    right: 1.8rem;
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.4rem;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.navbar.active {
    display: flex;
}

.navbar a {
    display: block;
    padding: 1.2rem 1.4rem;
    border-radius: 1.4rem;
    font-size: 1.55rem;
    color: var(--text-color);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.navbar a:hover,
.navbar a.active {
    background: var(--main-color-soft);
    color: var(--main-color);
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

#menu-icon,
#theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

#theme-icon:hover,
#menu-icon:hover {
    transform: translateY(-1px);
    color: var(--main-color);
    border-color: rgba(255, 159, 28, 0.35);
}

#menu-icon {
    font-size: 2rem;
}

#theme-icon {
    font-size: 1.9rem;
}

/* ===== HOME SECTION ===== */
.home {
    position: relative;
    display: grid;
    align-items: center;
    gap: 3.2rem;
    padding-top: 12rem;
}

.home-content {
    position: relative;
    z-index: 2;
    order: 2;
}

.home-content h1 {
    font-size: clamp(3.8rem, 10vw, 6.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    color: #fff;
}

body.light-mode .home-content h1 {
    color: #182033;
}

.blueprint-subtitle {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.blueprint-desc {
    max-width: 65rem;
    margin: 0 0 3.5rem;
    font-size: 1.8rem;
    line-height: 1.8;
    color: var(--muted-text);
}

/* ===== HOME BUTTONS & SOCIALS ===== */
.btn-box {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.btn-outline {
    background: transparent !important;
    border: 2px solid var(--main-color) !important;
    color: var(--main-color) !important;
    box-shadow: none !important;
}

.btn-outline:hover {
    background: var(--main-color-soft) !important;
    box-shadow: 0 10px 24px var(--main-color-soft) !important;
}

.home-sci {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 3.5rem;
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.8rem;
    height: 4.8rem;
    background: var(--surface-color);
    border: 1px solid var(--main-color);
    border-radius: 50%;
    font-size: 1.9rem;
    color: var(--main-color);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(255, 159, 28, 0.15);
}

.home-sci a:hover {
    background: var(--main-color);
    color: #111827;
    border-color: var(--main-color);
    box-shadow: 0 0 1.8rem var(--main-color-soft);
    transform: translateY(-3px);
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-radius: 1.2rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    width: auto;
    height: auto;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    background: var(--main-color-soft);
    color: var(--main-color);
    border-color: var(--main-color);
}

.social-icons a.linkedin-btn {
    border-color: #0077b5;
    background: rgba(0, 119, 181, 0.08);
    color: #0077b5;
}

.social-icons a.linkedin-btn:hover {
    background: #0077b5;
    color: #ffffff;
    border-color: #0077b5;
    box-shadow: 0 0 15px rgba(0, 119, 181, 0.3);
}

.social-icons a.github-btn {
    border-color: #30363d;
    background: rgba(48, 54, 61, 0.2);
    color: #ffffff;
}

.social-icons a.github-btn:hover {
    background: #1f2328;
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

/* Light Mode overrides for social buttons */
body.light-mode .social-icons a {
    border-width: 1.8px;
}

body.light-mode .social-icons a.linkedin-btn {
    border-color: #0077b5;
}

body.light-mode .social-icons a.github-btn {
    border: 1.8px solid rgba(31, 35, 40, 0.32); /* Thicker and bolder border for light mode contrast */
    background: rgba(31, 35, 40, 0.05);
    color: #1f2328;
}

body.light-mode .social-icons a.github-btn:hover {
    background: #1f2328;
    color: #ffffff;
    border-color: #1f2328;
    box-shadow: 0 0 15px rgba(31, 35, 40, 0.2);
}

body.light-mode .social-icons a.notes-btn {
    border-color: var(--main-color);
}

.social-icons a.notes-btn {
    border-color: var(--main-color);
    background: var(--main-color-soft);
    color: var(--main-color);
}

.social-icons a.notes-btn:hover {
    background: var(--main-color);
    color: #111827;
}

/* Photo Profile button styles */
.social-icons a.gallery-btn {
    transition: all 0.3s ease;
}

.social-icons a.gallery-btn:hover {
    background: #ffc107 !important;
    color: #111827 !important;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}

body.light-mode .social-icons a.gallery-btn {
    border: 1.8px solid rgba(255, 159, 28, 0.4) !important;
    background: rgba(255, 159, 28, 0.05) !important;
    color: #d97706 !important; /* Rich amber color with high readability against light backgrounds */
}

body.light-mode .social-icons a.gallery-btn:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.25);
}

/* =========================
   TEXT ANIMATION (RESTORED)
   ========================= */
.text-animation {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.text-animation span {
    position: relative;
    color: var(--main-color);
    padding-left: 0.5rem;
}

.text-animation span::before {
    content: "AI Engineer";
    animation: blueprintWords 12s infinite;
}

.text-animation span::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 50%;
    width: 3px;
    height: 85%;
    background: var(--main-color);
    transform: translateY(-50%);
    animation: blueprintCursor 0.6s infinite;
}

@keyframes blueprintCursor {
    to { opacity: 0; }
}

@keyframes blueprintWords {
    0%, 33% { content: "an AI Engineer"; }
    34%, 66% { content: "a Flutter Developer"; }
    67%, 100% { content: "a Mobile Engineer"; }
}

/* =========================
   MERGED AI LAB STYLES
   ========================= */
.ai-lab {
    padding: 10rem 1.8rem;
}

.cyber-grid {
    background: 
        linear-gradient(rgba(255, 159, 28, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 159, 28, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black, transparent 90%);
}

body.light-mode .cyber-grid {
    background: 
        linear-gradient(rgba(255, 159, 28, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 159, 28, 0.05) 1px, transparent 1px);
    opacity: 0.4;
}

.ai-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 2.8rem;
    padding: 3.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
}

.ai-card:hover {
    transform: translateY(-8px);
    border-color: var(--main-color);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2), 0 0 15px rgba(255, 159, 28, 0.1);
}

.ai-tech-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.4rem;
    border-radius: 1rem;
    font-size: 1.3rem;
    color: var(--muted-text);
    display: inline-block;
    margin: 0.4rem;
}

body.light-mode .ai-tech-pill {
    background: rgba(0, 0, 0, 0.04);
    color: var(--muted-text);
}

.ai-project-grid {
    display: grid;
    gap: 8rem;
    margin-top: 4rem;
}

.ai-project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.ai-project-visual {
    border-radius: 2.4rem;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,0.2);
    aspect-ratio: 16 / 9;
}

.ai-project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ai-project-item:hover .ai-project-visual img {
    transform: scale(1.05);
}

/* =========================
   HERO ACTIONS & MANIFEST
   ========================= */
.hero-actions .btn {
    padding: 1.4rem 2.8rem;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 1.4rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.primary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 159, 28, 0.3);
}

.secondary-btn:hover {
    background: rgba(255, 159, 28, 0.2) !important;
    transform: translateY(-5px);
}

.manifest-paper {
    background: var(--surface-color);
    box-shadow: 0 40px 100px rgba(0,0,0,0.3);
}

body.light-mode .manifest-paper {
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}

.manifest-content strong {
    color: var(--main-color);
}

.home-img,
.about-img {
    display: flex;
    justify-content: center;
}

.home-img {
    position: relative;
    z-index: 2;
    order: 1;
}

.home-img img,
.about-img img {
    width: min(72vw, 30rem);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 2.8rem;
    border: 1px solid rgba(255, 159, 28, 0.26);
    box-shadow: var(--shadow-strong);
}

.about {
    position: relative;
    display: grid;
    gap: 3.2rem;
    margin-top: 8rem;
    padding-top: 4.8rem;
    padding-bottom: 4.8rem;
    border: 1px solid var(--border-color);
    border-radius: 3.2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--surface-color);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

/* ABOUT CONTENT & COMPONENT VARIANTS */
.about-content {
    min-width: 0;
    position: relative;
    z-index: 2;
    padding: 2.4rem;
    border: 1px solid var(--border-color);
    border-radius: 2.8rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.about-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1.6rem;
    margin-top: 2rem;
}

.about-gallery-item {
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid rgba(255, 159, 28, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.about-gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.about-img.about-img--empty {
    min-height: 30rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2.8rem;
}

body.light-mode .about-content {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(24, 32, 51, 0.08);
    color: #151515;
}

.about.about-no-image {
    grid-template-columns: 1fr;
}

.about.about-no-image .about-img {
    display: none;
}

.about.about-no-image .about-content {
    max-width: 88rem;
    width: 100%;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 5rem;
    align-items: start;
    margin: 5rem auto 0;
    max-width: 120rem;
    width: 100%;
}

@media (max-width: 850px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

.about .about-timeline-col {
    text-align: left;
}

.ai-project-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
    padding: 3.5rem;
    border-radius: 2.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    margin-bottom: 6rem;
}

@media (max-width: 850px) {
    .ai-project-item {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        text-align: center;
        padding: 2.5rem;
    }
    .ai-project-visual {
        max-width: 340px;
        margin: 0 auto;
    }
    .ai-project-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .ai-project-info .btn {
        width: auto !important;
    }
}

.about-blob {
    position: absolute;
    top: -18%;
    left: -22%;
    width: min(54rem, 56vw);
    height: min(58rem, 72vh);
    background: linear-gradient(135deg, #ff6b00 0%, #ff9e00 100%);
    border-radius: 45% 55% 40% 95% / 40% 30% 90% 65%;
    opacity: 0.88;
    filter: saturate(110%);
    animation: aboutBlobFloat 8s infinite alternate ease-in-out;
    z-index: 1;
}

body.light-mode .about-blob {
    opacity: 0.72;
}

@keyframes aboutBlobFloat {
    from {
        transform: translate(0, 0) rotate(0deg);
    }

    to {
        transform: translate(-20px, 28px) rotate(5deg);
    }
}

.about-badge {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--main-color);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.about-content h2 {
    text-align: left;
    margin-bottom: 1.2rem;
}

.about-content h3 {
    max-width: 100%;
    font-size: clamp(2.2rem, 4vw, 3.1rem);
    line-height: 1.25;
    margin-bottom: 1.8rem;
}

body.light-mode .about-content h2,
body.light-mode .about-content h3,
body.light-mode .about-highlight strong,
body.light-mode .timeline-box h4,
body.light-mode .timeline-box li {
    color: #151515;
}

.about-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    color: var(--muted-text);
}

body.light-mode .about-content p,
body.light-mode .about-highlight span {
    color: rgba(21, 21, 21, 0.78);
}

.about-highlights {
    display: grid;
    gap: 1.2rem;
    margin-top: 2.2rem;
    margin-bottom: 2.6rem;
}

.about-highlight {
    padding: 1.5rem 1.6rem;
    border-radius: 1.8rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.about-highlight strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.55rem;
    color: var(--text-color);
}

.about-highlight span {
    display: block;
    font-size: 1.42rem;
    line-height: 1.6;
    color: var(--muted-text);
}

.about-content a:not(.btn) {
    color: var(--main-color);
    font-weight: 600;
}

.about-actions {
    margin-top: 2.8rem;
}

.about-actions .btn {
    position: relative;
    z-index: 3;
    display: inline-flex;
}

.timeline-box {
    margin-top: 2.8rem;
}

.timeline-box h4 {
    font-size: 1.95rem;
    margin-bottom: 1.6rem;
}

.timeline-box ul {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.timeline-box li {
    position: relative;
    padding: 1.4rem 1.4rem 1.4rem 3.2rem;
    border: 1px solid var(--border-color);
    border-radius: 1.6rem;
    background: rgba(255, 255, 255, 0.02);
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
}

.timeline-box li::before {
    content: "";
    position: absolute;
    top: 1.9rem;
    left: 1.4rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: var(--main-color);
    box-shadow: 0 0 0 0.5rem rgba(255, 159, 28, 0.14);
}

/* ===== PROJECTS / SERVICES SECTION ===== */
.services h2,
.contact h2 {
    margin-bottom: 3.2rem;
}

.services-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
}

.services-box {
    padding: 2.4rem 2rem;
    border-radius: 2.2rem;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--surface-color);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.services-box:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 159, 28, 0.34);
    box-shadow: var(--shadow-strong);
}

.services-box i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5.8rem;
    height: 5.8rem;
    margin-bottom: 1.8rem;
    border-radius: 1.6rem;
    background: var(--main-color-soft);
    color: var(--main-color);
    font-size: 2.6rem;
}

.services-box h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.services-box p {
    margin-bottom: 2rem;
    font-size: 1.55rem;
    line-height: 1.7;
    color: var(--muted-text);
}

.activities-intro {
    max-width: 68rem;
    margin: 0 auto 3.2rem;
    font-size: 1.65rem;
    line-height: 1.85;
    color: var(--muted-text);
    text-align: center;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 2rem;
}

.image-gallery {
    margin: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
    gap: 1.8rem;
}

.gallery-card {
    padding: 1.6rem;
    border-radius: 2.2rem;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.gallery-card img {
    width: 100%;
    height: 22rem;
    object-fit: cover;
    border-radius: 1.8rem;
    margin-bottom: 1.4rem;
}

.gallery-card p {
    font-size: 1.45rem;
    line-height: 1.8;
    color: var(--muted-text);
}

.activity-events {
    margin: 3rem 0 4rem;
}

.section-subheading {
    font-size: clamp(2.2rem, 3vw, 2.8rem);
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 1.8rem;
}

.activity-card {
    padding: 2.4rem;
    border-radius: 2.4rem;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--surface-color);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.activity-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 159, 28, 0.34);
    box-shadow: var(--shadow-strong);
}

.activity-card img {
    width: 100%;
    height: 25rem;
    object-fit: cover;
    border-radius: 2rem;
    margin-bottom: 1.6rem;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.activity-card img:hover {
    transform: scale(1.02);
}

.activity-card h3 {
    margin-bottom: 0.85rem;
    font-size: 2rem;
}

.activity-card p {
    font-size: 1.45rem;
    line-height: 1.8;
}

.read-more-link {
    display: inline-block;
    margin-top: 1.4rem;
    color: var(--main-color);
    font-size: 1.55rem;
    font-weight: 700;
    text-decoration: underline;
}

.read-more-link:hover {
    color: #ffc75c;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(10, 15, 28, 0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 200;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.image-modal .modal-body {
    position: relative;
    width: min(100%, 88rem);
    max-width: 100%;
    border-radius: 2rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-strong);
}

.image-modal .modal-body img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    background: #0a0f1c;
}

.image-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.image-modal .modal-caption {
    padding: 1.4rem 1.8rem 2rem;
    font-size: 1.5rem;
    line-height: 1.6;
    text-align: center;
    color: var(--text-color);
    background: rgba(10, 15, 28, 0.96);
}

.resume-container {
    display: grid;
    gap: 2rem;
}

.cert-preview-box,
.download-card,
.cert-item {
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.cert-preview-box,
.download-card {
    padding: 2.2rem;
    border-radius: 2.2rem;
}

.cert-preview-box h3,
.download-card h3,
.certs-list h3 {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
}

.cert-image-container {
    overflow: hidden;
    border: 1px solid rgba(255, 159, 28, 0.28);
    border-radius: 1.8rem;
    margin-bottom: 1.4rem;
}

.cert-image-container img {
    width: 100%;
    max-height: 42rem;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.cert-image-container img:hover {
    transform: scale(1.03);
}

.cert-caption,
.download-card p,
.cert-item p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--muted-text);
}

.resume-info {
    display: grid;
    gap: 2rem;
}

.certs-list {
    display: grid;
    gap: 1.4rem;
}

.cert-item {
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    padding: 1.8rem;
    border-radius: 1.8rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cert-item[data-cert] {
    cursor: pointer;
}

.cert-item[data-cert]:hover,
.cert-item[data-cert].active {
    border-color: var(--main-color);
    background: var(--main-color-soft);
    transform: translateX(6px);
}

.cert-item i {
    font-size: 2rem;
    color: var(--main-color);
    margin-top: 0.2rem;
}

.cert-item h4 {
    font-size: 1.7rem;
    margin-bottom: 0.6rem;
}

.faq-section {
    padding-top: 8rem;
}

.faq-container {
    display: grid;
    gap: 1.2rem;
    max-width: 82rem;
    margin: 0 auto;
}

details {
    padding: 1.8rem;
    border: 1px solid var(--border-color);
    border-radius: 1.8rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

details:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 28, 0.28);
}

summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    list-style: none;
    cursor: pointer;
    font-size: 1.7rem;
    font-weight: 600;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    flex-shrink: 0;
    font-size: 2.3rem;
    color: var(--main-color);
    transition: transform 0.25s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin-top: 1.1rem;
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--muted-text);
}

/* ===== CONTACT SECTION ===== */
.contact {
    position: relative;
}

.contact form {
    position: relative;
    z-index: 2;
    max-width: 78rem;
    margin: 0 auto;
}

.contact form .input-box {
    display: grid;
    gap: 1.2rem;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem 1.6rem;
    border: 1px solid var(--border-color);
    border-radius: 1.6rem;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 1.55rem;
}

.contact form textarea {
    min-height: 18rem;
    margin-top: 1.2rem;
    resize: vertical;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: rgba(255, 159, 28, 0.42);
    box-shadow: 0 0 0 0.4rem rgba(255, 159, 28, 0.1);
}

.contact form .btn {
    margin-top: 1.6rem;
}

.footer {
    width: min(100%, var(--container-width));
    margin: 0 auto;
    padding: 3.2rem 1.8rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    justify-content: center;
}

.footer-text p {
    font-size: 1.45rem;
    color: var(--muted-text);
    text-align: center;
}

.footer-iconTop a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--main-color);
    font-size: 1.9rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.footer-iconTop a:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 28, 0.35);
}

@media (min-width: 640px) {
    section {
        padding-left: 2.4rem;
        padding-right: 2.4rem;
    }

    .services-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact form .input-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer {
        flex-direction: row;
        justify-content: space-between;
    }

    .footer-text p {
        text-align: left;
    }
}

@media (min-width: 768px) {
    header {
        padding: 1.8rem 3rem;
    }

    .home {
        grid-template-columns: minmax(0, 1.1fr) minmax(26rem, 0.9fr);
        gap: 4rem;
    }

    .home-content {
        order: 1;
    }

    .home-img {
        order: 2;
    }

    .home-img,
    .about-img {
        justify-content: flex-end;
    }

    .about {
        grid-template-columns: minmax(22rem, 0.78fr) minmax(0, 1.22fr);
        align-items: start;
        padding-left: 3.2rem;
        padding-right: 3.2rem;
    }

    .about-img {
        justify-content: center;
        align-self: start;
        padding-top: 0.8rem;
    }

    .about-img img {
        width: min(100%, 26rem);
    }

    .resume-container {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }

    .about.about-no-image {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .navbar {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        max-width: none;
    }

    .navbar a {
        padding: 0.8rem 1.3rem;
        font-size: 1.5rem;
    }

    #menu-icon {
        display: none;
    }
}

@media (min-width: 1024px) {
    .services-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-img img,
    .about-img img {
        width: min(100%, 34rem);
    }

    .about {
        grid-template-columns: minmax(25rem, 0.9fr) minmax(0, 1.1fr);
        align-items: center;
    }

    .about.about-no-image {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .about {
        padding-top: 3.2rem;
    }

    .about-blob {
        top: -10%;
        left: -18%;
        width: 100vw;
        height: 42rem;
        opacity: 0.82;
    }

    .about-content {
        padding: 2rem 1.8rem;
    }
}

/* ===================================================
   RESPONSIVE SYSTEM
   Mobile  : ≤ 600px
   Tablet  : 601px – 900px
   Desktop : 901px – 1199px
   Wide    : ≥ 1200px (default)
=================================================== */

/* ── Shared: clamp section padding on all sizes ── */
.experience,
.ai-lab,
.activities,
.manifest,
.resume,
.faq-section,
.contact,
.services {
    padding-left: clamp(1.6rem, 5vw, 8rem);
    padding-right: clamp(1.6rem, 5vw, 8rem);
}

/* ─────────────────────────────────────────────────
   TABLET  601px – 900px
───────────────────────────────────────────────── */
@media (max-width: 900px) {
    /* Experience: collapse two-column to one column */
    .exp-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    /* AI Lab tech-stack grid: 2 columns on tablet */
    .tech-stack-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2.5rem !important;
    }

    /* Gallery: 2 columns on tablet */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Events grid */
    .events-grid {
        grid-template-columns: 1fr !important;
    }

    /* Navbar: tighten link spacing */
    .navbar a {
        padding: 0.6rem 1rem;
        font-size: 1.4rem;
    }
}

/* ─────────────────────────────────────────────────
   MOBILE  ≤ 600px
───────────────────────────────────────────────── */
@media (max-width: 600px) {
    html { font-size: 52%; }

    /* Hero */
    .home {
        grid-template-columns: 1fr !important;
        text-align: center;
        padding-top: 12rem;
        padding-bottom: 6rem;
    }
    .home-content h1 { font-size: 4rem; }
    .home-content p  { font-size: 1.55rem; }
    .btn-box { justify-content: center; }
    .home-sci { justify-content: center; }

    /* About */
    .about {
        grid-template-columns: 1fr !important;
        text-align: left;
    }
    .about-img { display: none; }
    .about-highlights {
        grid-template-columns: 1fr !important;
    }

    /* Experience: full single column */
    .exp-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* Right column timeline: reduce indent on mobile */
    .exp-grid > div:last-child {
        padding-left: 2.4rem !important;
    }

    /* AI Lab: single column */
    .tech-stack-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Software portfolio grid: 1 column */
    .services-container {
        grid-template-columns: 1fr !important;
    }

    /* Gallery: single column */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        overflow: hidden;
    }

    /* Activities events: single column */
    .events-grid {
        grid-template-columns: 1fr !important;
    }

    /* Resume two-column: stack */
    .resume-container {
        grid-template-columns: 1fr !important;
    }

    /* FAQ: full width items */
    .faq-item { padding: 2rem !important; }

    /* Contact form: single column inputs */
    .contact form .input-box {
        grid-template-columns: 1fr !important;
    }

    /* Section headings */
    .heading { font-size: 3.6rem !important; }
    .section-subheading { font-size: 2.2rem !important; }
}

/* ─────────────────────────────────────────────────
   SMALL MOBILE  ≤ 400px
───────────────────────────────────────────────── */
@media (max-width: 400px) {
    html { font-size: 48%; }
    .home-content h1 { font-size: 3.4rem; }
    .btn-box {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }
    .btn { width: 100%; text-align: center; }
}

/* =================================================
   FOOTER PILLS & SOCIAL LINKS
   ================================================= */
.footer-links-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding: 0 1.8rem;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.6rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 1.35rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
}

.footer-pill i {
    color: var(--main-color);
    font-size: 1.4rem;
}

.footer-pill:hover {
    border-color: var(--main-color);
    background: var(--main-color-soft);
    transform: translateY(-2px);
    color: var(--text-color);
}

/* =================================================
   INTERACTIVE TIMELINE DROPDOWNS
   ================================================= */
.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding: 1.6rem 2rem;
    border-radius: 1.8rem;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.015);
    border-color: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

/* Glow active state */
.timeline-item.active {
    background: rgba(255, 159, 28, 0.03);
    border-color: rgba(255, 159, 28, 0.15);
    box-shadow: var(--shadow-soft);
}

.timeline-node {
    position: absolute;
    left: -3.65rem;
    top: 2.3rem; /* Aligned with title center of padded card */
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--border-color);
    border: 3px solid var(--bg-color);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
}

.timeline-item.active .timeline-node {
    background: var(--main-color);
    border-color: var(--bg-color);
    box-shadow: 0 0 10px var(--main-color-soft);
    transform: scale(1.25);
}

.timeline-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    user-select: none;
}

.timeline-header h4 {
    font-size: 1.4rem;
    color: var(--main-color);
    font-weight: 800;
    margin: 0;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-header h4 {
    color: var(--text-color);
}

.timeline-item.active .timeline-header h4 {
    color: var(--main-color);
}

.timeline-arrow {
    font-size: 1.3rem;
    color: var(--muted-text);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.3s ease;
}

.timeline-item.active .timeline-arrow {
    transform: rotate(180deg);
    color: var(--main-color);
}

/* Dynamic details drawer */
.timeline-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}

.timeline-item.active .timeline-details {
    max-height: 420px;
    opacity: 1;
    margin-top: 1.5rem;
}

.timeline-intro {
    font-size: 1.45rem;
    color: var(--muted-text);
    line-height: 1.65;
    margin: 0 0 1.5rem 0;
}

.timeline-expanded-card {
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid var(--border-color);
    border-radius: 1.2rem;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.timeline-detail-row {
    display: flex;
    gap: 1rem;
    font-size: 1.35rem;
    line-height: 1.5;
}

.timeline-detail-row i {
    margin-top: 0.2rem;
    font-size: 1.3rem;
    color: var(--main-color);
    width: 1.8rem;
    text-align: center;
}

.timeline-detail-text strong {
    color: var(--text-color);
    font-weight: 600;
}

.timeline-detail-text span {
    color: var(--muted-text);
}
