/* ===================================
   CSS VARIABLES FOR THEMING
   =================================== */
:root {
    /* Light Mode Colors */
    --primary-color: #0891b2;
    --primary-hover: #0e7490;
    --primary-light: #06b6d4;
    --primary-soft: rgba(8, 145, 178, 0.08);

    --secondary-color: #0284c7;
    --accent-color: #0891b2;

    --background-color: #ffffff;
    --background-secondary: #f8fafc;
    --background-tertiary: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(8, 145, 178, 0.18);

    --danger-color: #dc2626;
    --success-color: #059669;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --primary-color: #06b6d4;
    --primary-hover: #22d3ee;
    --primary-light: #67e8f9;
    --primary-soft: rgba(34, 211, 238, 0.12);

    --secondary-color: #0ea5e9;
    --accent-color: #22d3ee;

    --background-color: #0f172a;
    --background-secondary: #1e293b;
    --background-tertiary: #334155;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;

    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 50px rgba(34, 211, 238, 0.22);

    --danger-color: #f87171;
    --success-color: #10b981;
}

/* ===================================
   GLOBAL STYLES & RESET
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--primary-color);
    color: white;
}

/* ===================================
   NAVIGATION BAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.7);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.brand-text {
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(15deg);
    color: white;
}

.theme-toggle svg {
    transition: color 0.3s ease;
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

/* Hamburger toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: var(--background-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-50px, 50px);
    }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
    animation: fadeInUp 0.8s ease-out;
}

.hero-text .greeting {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero-text .role {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-text .bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--background-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-ghost-soft {
    background: var(--primary-soft);
    color: var(--primary-color);
    border: 1px solid transparent;
}

.btn-ghost-soft:hover {
    background: transparent;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Image Styling */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInScale 1s ease-out 0.5s backwards;
}

.profile-image-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    transition: transform 0.5s ease;
    animation: morph 8s ease-in-out infinite;
}

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

@keyframes morph {

    0%,
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   SECTION COMMON
   =================================== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    margin-top: 0.5rem;
}

/* ===================================
   SKILLS SECTION
   =================================== */
.skills {
    padding: 6rem 2rem;
    background: var(--background-secondary);
}

.skills .section-title {
    margin-bottom: 3rem;
}

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

.skill-category {
    background: var(--background-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-chip {
    background: var(--background-tertiary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-chip:hover {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    padding: 6rem 2rem;
    background: var(--background-color);
}

.projects .section-title {
    margin-bottom: 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--background-secondary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image-container {
    position: relative;
    width: calc(100% - 2rem);
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: var(--background-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 1rem;
    border: 2px solid var(--border-color);
}

.project-image-container.landscape {
    aspect-ratio: 16 / 9;
}

.project-image-container.landscape .project-image {
    object-fit: cover;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 4rem;
    font-weight: 800;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--background-tertiary);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

/* ===================================
   EXPERIENCE SECTION
   =================================== */
.experience {
    padding: 6rem 2rem;
    background: var(--background-color);
}

.experience-timeline {
    max-width: 880px;
    margin: 0 auto;
    position: relative;
    padding-left: 2.25rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    opacity: 0.6;
}

.experience-item {
    position: relative;
    background: var(--background-secondary);
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -2.45rem;
    top: 1.85rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--background-color);
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.experience-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.experience-period {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.experience-role {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.experience-company {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.experience-bullets {
    list-style: none;
    margin-top: 1rem;
    padding: 0;
}

.experience-bullets li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    padding-left: 1.4rem;
    position: relative;
    margin-bottom: 0.55rem;
}

.experience-bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* ===================================
   EDUCATION SECTION
   =================================== */
.education {
    padding: 6rem 2rem;
    background: var(--background-secondary);
}

.education-timeline {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    padding-left: 2.25rem;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    opacity: 0.6;
}

.education-item {
    position: relative;
    background: var(--background-color);
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.education-item::before {
    content: '';
    position: absolute;
    left: -2.45rem;
    top: 1.85rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--background-secondary);
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.education-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.education-period {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.education-degree {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.education-institution {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.education-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.education-achievements {
    list-style: none;
    margin-top: 1rem;
    padding: 0;
}

.education-achievements li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 1.4rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.education-achievements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* ===================================
   CERTIFICATIONS SECTION
   =================================== */
.certifications {
    padding: 6rem 2rem;
    background: var(--background-color);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background: var(--background-secondary);
    padding: 0;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
}

.cert-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: var(--background-tertiary);
    cursor: zoom-in;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-bottom: 1px solid var(--border-color);
}

.cert-thumb:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: -3px;
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.cert-thumb:hover .cert-image {
    transform: scale(1.04);
}

.cert-thumb-overlay {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cert-thumb:hover .cert-thumb-overlay,
.cert-thumb:focus-visible .cert-thumb-overlay {
    opacity: 1;
    transform: translateY(0);
}

.cert-body {
    padding: 1.25rem 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cert-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: 0.35rem;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s ease;
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.cert-card:hover::before {
    transform: scaleY(1);
}

.cert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.cert-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.cert-issuer {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cert-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 0.85rem 1.5rem 1.25rem;
    border-top: 1px solid var(--border-color);
    gap: 0.75rem;
}

.cert-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.cert-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.cert-link {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.cert-link:hover {
    transform: translateX(3px);
    text-decoration: underline;
}

/* ===================================
   RESUME SECTION
   =================================== */
.resume-section {
    padding: 5rem 2rem;
    background: var(--background-secondary);
}

.resume-card {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.75rem;
    padding: 2.25rem 2.5rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.resume-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    height: 100%;
    background: radial-gradient(circle at top right, var(--primary-soft) 0%, transparent 70%);
    pointer-events: none;
}

.resume-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resume-card-content {
    position: relative;
    z-index: 1;
}

.resume-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.resume-card-subtitle {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 52ch;
}

.resume-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.resume-card-actions .btn {
    text-align: center;
    white-space: nowrap;
}

/* ===================================
   CERTIFICATE LIGHTBOX
   =================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-figure {
    margin: 0;
    max-width: min(1200px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.lightbox.open .lightbox-figure {
    transform: scale(1);
}

.lightbox-image {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    background: #fff;
}

.lightbox-caption {
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.01em;
    padding: 0 1rem;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.6);
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(90deg);
    outline: none;
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-tertiary) 100%);
    border-top: 1px solid var(--border-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact-form-column {
    background: var(--background-color);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-form-column .section-title {
    text-align: left;
    margin-bottom: 0.5rem;
}

.contact-message-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--background-color);
    color: var(--text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-input.has-error {
    border-color: var(--danger-color);
}

.form-error {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    font-weight: 500;
}

.form-textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.btn-send {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.6;
}

.form-status-message {
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
    box-shadow: var(--shadow-md);
}

.form-status-success {
    background: linear-gradient(135deg, var(--success-color), #047857);
}

.form-status-error {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Info Column */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-links-group {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-links-group:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
}

.quick-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.quick-links li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-links li a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.quick-links li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.quick-links li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ===================================
   GITHUB PROFILE CARD
   =================================== */
.contact-work-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.contact-work-group .contact-group-title {
    margin-bottom: 0;
}

.contact-group-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 0.35rem;
}

.github-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.4rem 1.5rem;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--background-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    isolation: isolate;
}

.github-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--primary-soft) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: -1;
}

.github-card:hover,
.github-card:focus-visible {
    transform: translateY(-3px) scale(1.01);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-color), 0 0 24px var(--primary-soft);
    outline: none;
}

.github-card:hover::before,
.github-card:focus-visible::before {
    opacity: 1;
}

.gh-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    background: var(--background-tertiary);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.github-card:hover .gh-avatar {
    border-color: var(--primary-color);
    transform: rotate(-2deg);
}

.gh-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.gh-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.gh-identity {
    min-width: 0;
}

.gh-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gh-login {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin: 0.1rem 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gh-mark {
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
}

.github-card:hover .gh-mark {
    color: var(--primary-color);
    transform: translate(2px, -2px);
}

.gh-stats {
    display: flex;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.gh-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.gh-stat svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.gh-stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.gh-stat-label {
    color: var(--text-tertiary);
}

/* Loading skeleton */
.github-card.is-loading {
    pointer-events: none;
}

.github-card-skeleton {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    width: 100%;
}

.gh-skel-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--background-tertiary);
}

.gh-skel-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.gh-skel-line {
    height: 12px;
    border-radius: 6px;
    background: var(--background-tertiary);
}

.gh-skel-line-lg { width: 60%; }
.gh-skel-line-sm { width: 35%; height: 10px; }

.gh-skel-stats {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.3rem;
}

.gh-skel-stat {
    width: 58px;
    height: 14px;
    border-radius: 6px;
    background: var(--background-tertiary);
}

.gh-skel-avatar,
.gh-skel-line,
.gh-skel-stat {
    animation: gh-skel-pulse 1.4s ease-in-out infinite;
}

@keyframes gh-skel-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Fallback */
.github-card.is-fallback {
    align-items: center;
}

.gh-fallback-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gh-fallback-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0.2rem 0 0;
}

.gh-fallback-arrow {
    color: var(--primary-color);
    font-weight: 700;
    margin-left: 0.35rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--background-secondary);
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-content p {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0.5rem 0;
}

.footer-disclaimer {
    font-size: 0.85rem !important;
    margin-top: 1rem;
}

.footer-disclaimer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-disclaimer a:hover {
    color: var(--primary-hover);
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 2rem auto;
}

.footer-socials {
    text-align: center;
}

.social-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

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

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ===================================
   SCROLL-TO-TOP BUTTON
   =================================== */
.scroll-top {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--primary-hover);
    transform: translateY(-4px);
}

/* ===================================
   SCROLL REVEAL
   =================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

    .profile-image-container {
        width: 320px;
        height: 320px;
        margin: 0 auto;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-column .section-title {
        text-align: center;
    }

    .resume-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1.75rem;
        gap: 1.25rem;
    }

    .resume-card-icon {
        margin: 0 auto;
    }

    .resume-card-subtitle {
        margin: 0 auto;
    }

    .resume-card-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .nav-container {
        padding: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--background-color);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-130%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-md);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .nav-menu.open {
        transform: translateY(0);
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
    }

    .nav-link::after {
        display: none;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text .greeting {
        font-size: 1.2rem;
    }

    .hero-text .role {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-column {
        padding: 2rem;
    }

    .contact-links-group {
        padding: 1.5rem;
    }

    .github-card {
        padding: 1.25rem;
        gap: 0.9rem;
    }

    .gh-avatar,
    .gh-skel-avatar {
        width: 60px;
        height: 60px;
    }

    .gh-stats {
        gap: 0.8rem;
    }

    .social-links {
        gap: 1rem;
    }

    .education-timeline,
    .experience-timeline {
        padding-left: 1.75rem;
    }

    .education-item::before,
    .experience-item::before {
        left: -2rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

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

    .profile-image-container {
        width: 260px;
        height: 260px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-column {
        padding: 1.5rem;
    }

    .contact-links-group {
        padding: 1.2rem;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }

    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }

    .lightbox {
        padding: 1rem;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }

    .lightbox-image {
        max-height: 78vh;
    }

    .resume-card {
        padding: 1.75rem 1.25rem;
    }

    .resume-card-title {
        font-size: 1.25rem;
    }
}

/* ===================================
   REDUCED MOTION
   =================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
