/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Fonts */
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Light Theme (Default: White / Modern Clean) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-canvas: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary-color: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary-color: #06b6d4; /* Cyan */
    --secondary-glow: rgba(6, 182, 212, 0.15);
    --accent-color: #a855f7; /* Purple */
    --accent-glow: rgba(168, 85, 247, 0.15);

    --border-color: rgba(226, 232, 240, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 20px 40px -15px rgba(99, 102, 241, 0.2), 0 0 20px rgba(99, 102, 241, 0.05);

    /* Animation Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Layout */
    --header-height: 80px;
    --max-width: 1200px;
    --transition-speed: 0.4s;
}

/* Dark Theme Variables */
html[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-canvas: #07090e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary-color: #00f2fe; /* Neon Cyan */
    --primary-glow: rgba(0, 242, 254, 0.25);
    --secondary-color: #4facfe; /* Neon Blue */
    --secondary-glow: rgba(79, 172, 254, 0.25);
    --accent-color: #d946ef; /* Neon Purple / Magenta */
    --accent-glow: rgba(217, 70, 239, 0.25);

    --border-color: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.5);
    --card-shadow-hover: 0 20px 50px -10px var(--primary-glow), 0 0 25px var(--accent-glow);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Background Canvas */
#gravity-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background-color: var(--bg-canvas);
    transition: background-color var(--transition-speed) ease;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed) ease, border-bottom var(--transition-speed) ease, transform 0.3s ease;
}

header.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo-accent {
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-glow);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-secondary);
}

.theme-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-glow);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
}

/* Mobile Navigation Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.mobile-nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px -8px var(--primary-color), 0 0 15px var(--accent-glow);
}

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -10px var(--primary-glow);
}

/* Glassmorphism Cards */
.card-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.5s var(--ease-out-expo), border-color 0.4s ease;
}

.card-glass:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-glow);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Section Header styling */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tagline {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-primary);
}

.title-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 30%, var(--accent-color) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 20px 48px;
    position: relative;
    z-index: 2;
}

.hero-header-group {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-details-group {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

/* Visual / Floating components in Hero */
.hero-visual {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gravity-orb-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    mix-blend-mode: screen;
}

.orb-primary {
    top: 20%;
    left: 20%;
    width: 250px;
    height: 250px;
    background: var(--primary-color);
    animation: orb-float 8s infinite alternate ease-in-out;
}

.orb-secondary {
    bottom: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: var(--accent-color);
    animation: orb-float 10s infinite alternate-reverse ease-in-out;
}

/* Floating interactive cards */
.floating-card {
    position: absolute;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 260px;
    cursor: grab;
    z-index: 5;
    animation: bounce-gentle 6s infinite ease-in-out;
}

.floating-card:active {
    cursor: grabbing;
}

.floating-card .card-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-card .card-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.floating-card .card-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Card positions and individual animations */
.card-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 5%;
    animation-delay: -2s;
}

.card-3 {
    bottom: 10%;
    left: 20%;
    animation-delay: -4s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.mouse-icon {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite ease-in-out;
}

.scroll-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.about-info-card {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}

.avatar-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px dashed var(--primary-color);
    border-radius: 50%;
    animation: rotate-clockwise 20s linear infinite;
}

.ring-outer {
    width: 120%;
    height: 120%;
    border: 1px solid var(--accent-color);
    opacity: 0.4;
    animation: rotate-counter 30s linear infinite;
}

.profile-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    animation: bounce-gentle 4s infinite ease-in-out;
}

.about-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.about-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.about-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.about-text-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-heading {
    font-size: 2rem;
    line-height: 1.3;
}

.about-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.academic-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.stat-item {
    padding: 20px;
    text-align: center;
}

.stat-val {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-lbl {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

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

.skill-card {
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.skill-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Skill Icon Color Variants */
.office { color: #2b579a; }
.figma { color: #f24e1e; }
.canva { color: #00c4cc; }
.capcut { color: #7f56d9; }
.xampp { color: #fb7a24; }
.unity { color: #222c37; }
.html { color: #e34f26; }
.css { color: #1572b6; }
.java { color: #007396; }

html[data-theme="dark"] .unity {
    color: #ffffff;
}

.skill-name {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.skill-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    min-height: 48px;
}

.skill-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

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

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-img-wrapper {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.project-temp-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.style-gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.style-gradient-2 { background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%); }
.style-gradient-3 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.project-main-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.project-card:hover .project-temp-img {
    transform: scale(1.1);
}

.project-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}

.project-card:hover .project-glow {
    opacity: 1;
}

.project-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 3;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 5px;
    background: var(--bg-canvas);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
}

.contact-info-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.contact-info-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.contact-sub {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.info-detail-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.info-detail-item .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-glow);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-detail-item h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.info-detail-item p {
    font-size: 1rem;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.social-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Contact Form */
.contact-form-panel {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-submit {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: var(--bg-secondary);
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-sub {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==========================================================================
   ANIMATIONS & FLOAT EFFECT KEYFRAMES
   ========================================================================== */

/* Orb float animation */
@keyframes orb-float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(30px, -40px) scale(1.1);
    }
}

/* Gentle float-like bobbing effect for general elements */
@keyframes bounce-gentle {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Rotations for avatar outer ring */
@keyframes rotate-clockwise {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate-counter {
    0% {
        transform: rotate(360deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Scroll indicator animation */
@keyframes scroll-wheel {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    50% {
        opacity: 0.3;
        transform: translate(-50%, 15px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ==========================================================================
   RESPONSIVE LAYOUTS & SPACING ADJUSTMENTS
   ========================================================================== */
@media (max-width: 992px) {
    /* Reduce global section spacing on mobile/tablets */
    .hero-section {
        padding-top: 100px;
        padding-bottom: 30px;
        min-height: auto;
    }
    
    .about-section, .skills-section, .projects-section, .contact-section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    /* Stack elements: Name -> Photo -> Description & Buttons */
    .hero-grid {
        display: flex;
        flex-direction: column;
        text-align: center;
        align-items: center;
        justify-content: center;
        gap: 16px;
    }

    .hero-header-group {
        order: 1;
        align-items: center;
        text-align: center;
    }

    .hero-visual {
        order: 2;
        height: auto;
        margin: 12px 0 24px 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-details-group {
        order: 3;
        align-items: center;
        text-align: center;
    }

    .hero-title {
        font-size: 3.2rem;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        max-width: 100%;
        margin-bottom: 24px;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
        width: 100%;
    }

    .hero-socials {
        justify-content: center;
        margin-top: 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    header {
        height: 70px;
    }
    
    .nav-menu {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .academic-stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PHOTO & SWINGING LANYARD STYLES (MATCHING REFERENCE DESIGN)
   ========================================================================== */

/* Hero Text Adjustments */
.hero-greeting {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hero-badge {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    font-family: var(--font-heading);
}

.hero-socials {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.hero-socials .social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
}

.hero-socials .social-icon:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

/* Hero Portrait (Right Side Photo) */
.hero-portrait-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 0 auto;
}

/* Semi-circular modern background element like reference */
.hero-portrait-glow {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 85%;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--primary-glow) 100%);
    border-radius: 200px 200px 30px 30px;
    border: 1px solid var(--glass-border);
    z-index: 1;
}

html[data-theme="dark"] .hero-portrait-glow {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.4) 0%, var(--primary-glow) 100%);
}

.hero-portrait-frame {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: visible; /* Allows head or shoulders to pop out slightly */
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-portrait-img {
    width: 100%;
    height: auto;
    max-height: 590px;
    object-fit: contain;
    object-position: top center;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s var(--ease-out-expo);
}

.hero-portrait-container:hover .hero-portrait-img {
    transform: translateY(-8px) scale(1.02);
}

/* About Lanyard Layout (Left Side of About Grid) */
.about-lanyard-section {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Mount pin at top of the about grid row */
.about-lanyard-anchor {
    position: absolute;
    top: 0;
    width: 30px;
    height: 8px;
    background: #64748b;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 8;
}

/* Lanyard suspension styling inside About section */
.about-lanyard-section .lanyard-container {
    position: relative;
    top: 4px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    animation: lanyard-swing 4.5s infinite ease-in-out;
    z-index: 7;
}

.lanyard-strap {
    width: 10px;
    height: 80px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.lanyard-strap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 3px;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
}

.lanyard-clip {
    width: 18px;
    height: 20px;
    background: #94a3b8;
    border-radius: 3px;
    margin-top: -2px;
    position: relative;
}

.lanyard-clip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 5px;
    width: 8px;
    height: 8px;
    background: #64748b;
    border-radius: 50%;
}

.lanyard-badge {
    width: 190px;
    height: 280px;
    border-radius: 16px;
    margin-top: 4px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    box-shadow: var(--card-shadow);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lanyard-badge:hover {
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow-hover);
}

.lanyard-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.lanyard-logo {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.lanyard-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px 0;
}

.lanyard-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.lanyard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lanyard-details .lanyard-name {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.lanyard-details .lanyard-id {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.lanyard-details .lanyard-dept {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.lanyard-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
}

.lanyard-tag {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Swing Keyframes */
@keyframes lanyard-swing {
    0% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(4deg);
    }
    100% {
        transform: rotate(-4deg);
    }
}

/* About Side Details Card */
.about-profile-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.profile-detail-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-detail-row .detail-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-glow);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.profile-detail-row .detail-text strong {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-detail-row .detail-text p {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-portrait-container {
        height: 320px;
        max-width: 270px;
    }
    
    .about-lanyard-section {
        height: 300px;
    }
    
    /* Shrink lanyard on tablet */
    .about-lanyard-section .lanyard-strap {
        height: 50px;
    }
    
    .about-lanyard-section .lanyard-badge {
        width: 160px;
        height: 240px;
        padding: 10px;
    }
    
    .about-lanyard-section .lanyard-avatar {
        width: 55px;
        height: 55px;
        margin-bottom: 6px;
    }
    
    .about-lanyard-section .lanyard-details .lanyard-name {
        font-size: 0.7rem;
    }
    
    .about-lanyard-section .lanyard-details .lanyard-id {
        font-size: 0.55rem;
    }
    
    .about-lanyard-section .lanyard-details .lanyard-dept {
        font-size: 0.6rem;
    }
}

@media (max-width: 768px) {
    .hero-portrait-container {
        height: 270px;
        max-width: 220px;
    }
    
    .about-lanyard-section {
        height: 250px;
    }
    
    /* Shrink lanyard further on mobile phones */
    .about-lanyard-section .lanyard-strap {
        height: 40px;
    }
    
    .about-lanyard-section .lanyard-badge {
        width: 140px;
        height: 210px;
        padding: 8px;
        border-radius: 12px;
    }
    
    .about-lanyard-section .lanyard-avatar {
        width: 45px;
        height: 45px;
        margin-bottom: 4px;
    }
    
    .about-lanyard-section .lanyard-logo {
        font-size: 0.55rem;
    }
    
    .about-lanyard-section .lanyard-details .lanyard-name {
        font-size: 0.65rem;
    }
    
    .about-lanyard-section .lanyard-details .lanyard-id {
        font-size: 0.5rem;
    }
    
    .about-lanyard-section .lanyard-details .lanyard-dept {
        font-size: 0.55rem;
    }
    
    .about-lanyard-section .lanyard-tag {
        font-size: 0.5rem;
    }

    /* Horizontal scroll for projects on mobile */
    .projects-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding: 10px 16px 24px 16px;
        margin: 0 -16px;
        scrollbar-width: thin;
        scroll-padding: 16px;
        -webkit-overflow-scrolling: touch; /* smooth momentum scrolling on iOS */
    }
    
    .projects-grid::-webkit-scrollbar {
        height: 6px;
    }
    
    .projects-grid::-webkit-scrollbar-track {
        background: var(--bg-canvas);
        border-radius: 10px;
    }
    
    .projects-grid::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
    
    .projects-grid .project-card {
        flex: 0 0 290px;
        scroll-snap-align: start;
        height: auto;
    }
}


