/* 
  APPLE × GLASSMORPHISM × DEVELOPER PORTFOLIO
  Designed & Built for Prashant Bairagi

  ╔══════════════════════════════════════════════════════════════════╗
  ║  ★  DESIGN MASTERPIECE — THE NAVBAR GLASS PILL  ★               ║
  ║                                                                  ║
  ║  The floating navbar (position: fixed, border-radius: 999px)    ║
  ║  is the centrepiece of this entire design language.             ║
  ║  Its glass recipe MUST be the reference standard for every      ║
  ║  other glass surface on the site (modals, cards, lightbox…).   ║
  ║                                                                  ║
  ║  Navbar glass formula (DO NOT deviate without reason):          ║
  ║    background:       var(--glass-bg)     ← 70% white / 60% dark ║
  ║    backdrop-filter:  blur(20px)          ← the magic number     ║
  ║    border:           1px solid var(--glass-border)              ║
  ║    box-shadow:       var(--glass-shadow)                        ║
  ║    border-radius:    999px  (pill shape, floating 1rem from top) ║
  ║                                                                  ║
  ║  Any new overlay, modal, or card that wants to feel             ║
  ║  "on-brand" must copy these exact token values.                 ║
  ╚══════════════════════════════════════════════════════════════════╝
*/

:root {
    /* Base Colors - Light Theme */
    --bg-base: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    
    /* Glassmorphism Colors - Light Theme */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    
    /* Accent Colors */
    --accent-blue: #0071e3;
    --accent-cyan: #00c6ce;
    --status-progress: #f59e0b;
    --status-completed: #10b981;
    --flagship-gold: #fbbf24;
    
    /* Gradients for background blobs */
    --blob-1: rgba(0, 113, 227, 0.15);
    --blob-2: rgba(0, 198, 206, 0.15);
    
    /* Background Watermark Opacity */
    --sukti-opacity: 0.20;
    
    /* Spacing & Layout */
    --container-width: 1100px;
    --nav-height: 70px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
    /* Base Colors - Dark Theme */
    --bg-base: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    
    /* Glassmorphism Colors - Dark Theme */
    --glass-bg: rgba(28, 28, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    /* Gradients for background blobs (slightly darker) */
    --blob-1: rgba(0, 113, 227, 0.1);
    --blob-2: rgba(0, 198, 206, 0.1);

    /* Background Watermark Opacity */
    --sukti-opacity: 0.14;
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide scrollbar globally but keep functionality */
::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 2rem);
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
}

/* Elegant Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #1a5c2a 0%, #FFD700 100%);
    z-index: 10001; /* Remains top-most */
    pointer-events: none;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.1s cubic-bezier(0.1, 0.8, 0.2, 1);
    will-change: transform;
}

/* Background Gradients (Blobs) */
.bg-gradient {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    transition: background-color 0.4s ease;
}

.bg-blob-1 {
    width: 650px;
    height: 650px;
    background-color: var(--blob-1);
    top: -200px;
    left: -150px;
}

.bg-blob-2 {
    width: 500px;
    height: 500px;
    background-color: var(--blob-2);
    bottom: -100px;
    right: -100px;
}

.bg-blob-3 {
    width: 600px;
    height: 600px;
    background-color: var(--blob-2);
    top: 30%;
    right: -150px;
}

.bg-blob-4 {
    width: 550px;
    height: 550px;
    background-color: var(--blob-1);
    top: 60%;
    left: -150px;
}

/* Center Sanskrit Watermark Background */
.sanskrit-motto-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    text-align: center;
    pointer-events: none;
    z-index: -2; /* behind content and blobs */
    opacity: var(--sukti-opacity);
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sanskrit-bg-line {
    font-family: 'Inter', serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Desktop / Laptop font sizes */
@media (min-width: 769px) {
    .sanskrit-bg-line {
        font-size: 2.2rem;
        line-height: 1.6;
    }
}

/* Mobile font sizes */
@media (max-width: 768px) {
    .sanskrit-bg-line {
        font-size: 1.1rem;
        line-height: 1.5;
    }
}

/* 3-Step Million Dollar Intro Page Load Transitions */
body.intro-active .sanskrit-motto-bg {
    animation: intro-sanskrit 3.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    will-change: transform, opacity;
}

body.intro-active .availability-badge,
body.intro-active .headline,
body.intro-active .subheadline,
body.intro-active .intro-text,
body.intro-active .hero-badges,
body.intro-active .hero-cta,
body.intro-active .resume-updated-wrapper,
body.intro-active .hero-social-links,
body.intro-active .hero-visual {
    opacity: 0;
    animation: intro-item 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    will-change: transform, opacity;
}

body.intro-active .availability-badge { animation-delay: 1.4s; }
body.intro-active .headline { animation-delay: 1.55s; }
body.intro-active .subheadline { animation-delay: 1.7s; }
body.intro-active .intro-text { animation-delay: 1.85s; }
body.intro-active .hero-badges { animation-delay: 2.0s; }
body.intro-active .hero-cta { animation-delay: 2.15s; }
body.intro-active .resume-updated-wrapper { animation-delay: 2.15s; }
body.intro-active .hero-social-links { animation-delay: 2.3s; }
body.intro-active .hero-visual { animation-delay: 2.45s; }

@keyframes intro-sanskrit {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.3);
        color: var(--text-primary);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
        color: var(--text-primary);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
        color: var(--text-primary);
    }
    75% {
        opacity: var(--sukti-opacity);
        transform: translate(-50%, -50%) scale(1.0);
        color: var(--text-secondary);
    }
    100% {
        opacity: var(--sukti-opacity);
        transform: translate(-50%, -50%) scale(1.0);
        color: var(--text-secondary);
    }
}

@keyframes intro-item {
    0% {
        opacity: 0;
        transform: translateY(25px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Reusable Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Glassmorphism Utility */
.glass {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), background 0.4s ease, border-color 0.4s ease;
}

/* Glass interactive spotlight hover overlay */
.glass:not(.hero-social-icon)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(400px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(255, 255, 255, 0.05), transparent 70%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

[data-theme="dark"] .glass:not(.hero-social-icon)::before {
    background: radial-gradient(450px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(0, 113, 227, 0.08), transparent 70%);
}

.glass:not(.hero-social-icon):hover::before {
    opacity: 1;
}

/* Typography specifics */
h1, h2, h3, h4 {
    letter-spacing: -0.01em;
}

p {
    color: var(--text-secondary);
}

.resume-updated {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.primary-btn {
    background-color: var(--text-primary);
    color: var(--bg-base);
}

.primary-btn:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background-color: rgba(134, 134, 139, 0.1);
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.icon-btn:hover {
    background-color: rgba(134, 134, 139, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    height: var(--nav-height);
    border-radius: 999px;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 1.5rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

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

.mobile-menu-toggle {
    display: none;
}

.mobile-menu {
    position: fixed;
    top: calc(var(--nav-height) + 1.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.mobile-nav-links a:hover, .mobile-nav-links a.active {
    background-color: rgba(134, 134, 139, 0.1);
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 8rem;
    padding-bottom: 3rem;
}

.hero-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1.3;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Hero Visual Panel */
.hero-visual {
    flex: 1;
    max-width: 480px;
    width: 100%;
    margin-top: 7.2rem; /* Adjusted downwards for absolute layout balance */
}

.code-window {
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    transform: translateX(12px); /* Shifted rightward/outward */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.code-window:hover {
    transform: translateY(-5px) translateX(12px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .code-window:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="dark"] .code-header {
    background: rgba(255, 255, 255, 0.02);
}

.code-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-header .dot.red { background-color: #ff5f56; }
.code-header .dot.yellow { background-color: #ffbd2e; }
.code-header .dot.green { background-color: #27c93f; }

.code-title {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.code-body {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: left;
}

.code-body pre {
    margin: 0;
}

.code-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: var(--accent-blue);
    margin-left: 2px;
    vertical-align: middle;
    animation: caret-blink 1s step-end infinite;
    will-change: background-color;
}

@keyframes caret-blink {
    from, to { background-color: transparent }
    50% { background-color: var(--accent-blue) }
}

.code-body code {
    font-family: inherit;
    color: var(--text-primary);
}

/* Syntax Highlighting */
.code-body .keyword { color: #d63384; font-weight: 600; }
.code-body .string { color: #198754; }
.code-body .class-name { color: #0d6efd; font-weight: 600; }
.code-body .method { color: #6f42c1; }

[data-theme="dark"] .code-body .keyword { color: #ff79c6; }
[data-theme="dark"] .code-body .string { color: #f1fa8c; }
[data-theme="dark"] .code-body .class-name { color: #8be9fd; }
[data-theme="dark"] .code-body .method { color: #50fa7b; }

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--status-completed);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.headline {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.subheadline {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.8rem;
}

.subheadline .highlight {
    font-weight: 700;
    color: var(--text-primary);
}

.intro-text {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.hero-badge {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(134, 134, 139, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-badge i {
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.hero-social-links {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
}

.hero-social-icon {
    position: relative; /* needed for tooltip positioning */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
}

.hero-social-icon:hover {
    transform: translateY(-3px);
    background-color: rgba(134, 134, 139, 0.2);
}

/* ===== TOOLTIP SYSTEM ===== */
/* Shared styles for any element with data-tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 9999;
}

/* Arrow under the tooltip */
[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 4px solid transparent;
    border-top-color: var(--glass-border);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Floating mail button tooltip: appears to the LEFT */
.floating-mail-btn[data-tooltip]::before {
    bottom: auto;
    top: 50%;
    left: auto;
    right: calc(100% + 14px);
    transform: translateY(-50%) translateX(-4px);
}

.floating-mail-btn[data-tooltip]::after {
    bottom: auto;
    top: 50%;
    left: auto;
    right: calc(100% + 6px);
    transform: translateY(-50%) translateX(-4px);
    border-top-color: transparent;
    border-left-color: var(--glass-border);
}

.floating-mail-btn[data-tooltip]:hover::before {
    transform: translateY(-50%) translateX(0);
}

.floating-mail-btn[data-tooltip]:hover::after {
    transform: translateY(-50%) translateX(0);
}



.hero-quote-container {
    margin-top: 2.5rem;
}

.hero-quote {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 3rem;
    border-radius: var(--border-radius-lg);
    font-size: 1.15rem;
    font-style: italic;
    text-align: center;
    color: var(--text-primary);
}

/* About Section */
.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.about-card {
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.about-text p strong {
    color: var(--text-primary);
}

.core-goal {
    color: var(--text-primary);
    font-size: 1.15rem;
}

.stats-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 2rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

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

/* Skills Section */
.skills-header {
    margin-bottom: 3rem;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--accent-blue);
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

.skills-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
    align-items: stretch; /* Cards in same row share equal height */
}

.skill-card {
    padding: 2.25rem;
    border-radius: var(--border-radius-md);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    background: var(--glass-bg);
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%; /* stretch to fill grid row */
    cursor: default;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
    background: rgba(255, 255, 255, 0.75); /* Translucent hover */
}

[data-theme="dark"] .skill-card:hover {
    background: rgba(28, 28, 30, 0.65); /* Translucent dark hover */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.skill-icon-wrapper {
    width: 44px;
    height: 44px;
    background-color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .skill-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.9);
}

.skill-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.skill-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.skill-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    /* NO margin-top: auto — chips now sit naturally below description */
}

.skill-chip {
    padding: 0.3rem 0.85rem;
    /* Glass-tinted chip: subtle, elegant, premium */
    background: rgba(134, 134, 139, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(134, 134, 139, 0.18);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.skill-chip:hover {
    background: rgba(134, 134, 139, 0.18);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.skill-chip.highlight {
    background: rgba(0, 113, 227, 0.12);
    color: var(--accent-blue);
    border-color: rgba(0, 113, 227, 0.25);
    font-weight: 600;
}

.primary-card {
    border: 1px solid rgba(10, 132, 255, 0.2);
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.05);
}

[data-theme="dark"] .primary-card {
    border: 1px solid rgba(10, 132, 255, 0.3);
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.1);
}

/* Salesforce — mild demotion */
.subtle-card {
    opacity: 0.72;
}

.subtle-card:hover {
    opacity: 1;
}

/* Embedded Systems — heavy demotion: visibly backgrounded, not front-line */
.subtle-card--heavy {
    opacity: 0.42;
    filter: saturate(0.6);
    transform: scale(0.985);
}

.subtle-card--heavy .skill-title {
    font-size: 1rem;
    font-weight: 600;
}

.subtle-card--heavy .skill-desc {
    font-size: 0.85rem;
}

.subtle-card--heavy .skill-chip {
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
}

.subtle-card--heavy:hover {
    opacity: 1;
    filter: saturate(1);
    transform: scale(1);
}

.nptel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

/* Projects Section */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 113, 227, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 25px rgba(0, 113, 227, 0.08);
}

[data-theme="dark"] .project-card:hover {
    border-color: rgba(0, 113, 227, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 113, 227, 0.15);
}

/* Flagship Project Standout styling */
.project-card.flagship {
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: var(--glass-shadow), 0 0 15px rgba(251, 191, 36, 0.05);
    animation: flagshipPulse 6s ease-in-out infinite;
}

[data-theme="dark"] .project-card.flagship {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(251, 191, 36, 0.08);
}

.project-card.flagship:hover {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.15), 0 0 30px rgba(251, 191, 36, 0.15);
}

[data-theme="dark"] .project-card.flagship:hover {
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.5), 0 0 35px rgba(251, 191, 36, 0.22);
}

@keyframes flagshipPulse {
    0% {
        border-color: rgba(251, 191, 36, 0.35);
        box-shadow: var(--glass-shadow), 0 0 15px rgba(251, 191, 36, 0.05);
    }
    50% {
        border-color: rgba(0, 113, 227, 0.45);
        box-shadow: var(--glass-shadow), 0 0 25px rgba(0, 113, 227, 0.1);
    }
    100% {
        border-color: rgba(251, 191, 36, 0.35);
        box-shadow: var(--glass-shadow), 0 0 15px rgba(251, 191, 36, 0.05);
    }
}

[data-theme="dark"] @keyframes flagshipPulse {
    0% {
        border-color: rgba(251, 191, 36, 0.35);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(251, 191, 36, 0.05);
    }
    50% {
        border-color: rgba(0, 113, 227, 0.45);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 25px rgba(0, 113, 227, 0.1);
    }
    100% {
        border-color: rgba(251, 191, 36, 0.35);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(251, 191, 36, 0.05);
    }
}

.flagship-ribbon {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--flagship-gold) 0%, #d97706 100%);
    color: #000000;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
    z-index: 5;
}

/* Collapsed Layout */
.project-collapsed-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
}

.project-image-column {
    flex: 0 0 190px; /* Reduced by 13.6% (from 220px) */
    height: 125px; /* Reduced by 10.7% (from 140px) */
    border-radius: var(--border-radius-md);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .project-image-column {
    background: rgba(255, 255, 255, 0.02);
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Specific zoom-in for flagship project image field */
#project-kharcha-pani .project-thumbnail {
    transform: scale(1.34); /* Zoomed in 12% more (from 1.22) */
}

#project-kharcha-pani .project-thumbnail:hover {
    transform: scale(1.42);
}

.project-info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem; /* Increased spacing */
}

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

.project-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.project-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: -0.85rem 0 0.15rem 0; /* Pulled closer to title */
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    font-style: italic;
}

.project-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.project-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.25rem 0; /* Increased spacing */
}

.highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(0, 113, 227, 0.06);
    border: 1px solid rgba(0, 113, 227, 0.12);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.highlight-badge:hover {
    background: rgba(0, 113, 227, 0.12);
    border-color: rgba(0, 113, 227, 0.25);
    transform: translateY(-1px);
}

.tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.25rem 0; /* Increased spacing */
}

.glass-detail-card.prominent {
    border-color: rgba(0, 113, 227, 0.35);
    background: rgba(0, 113, 227, 0.02);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.05);
}

[data-theme="dark"] .glass-detail-card.prominent {
    border-color: rgba(0, 113, 227, 0.5);
    background: rgba(0, 113, 227, 0.04);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.12);
}

.tech-chip {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    background: rgba(134, 134, 139, 0.05);
    color: var(--text-secondary);
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    transition: all 0.25s ease;
}

.tech-chip:hover {
    transform: scale(1.05);
    color: var(--text-primary);
    background: rgba(134, 134, 139, 0.12);
    border-color: rgba(134, 134, 139, 0.25);
}

.project-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.project-actions .btn {
    font-weight: 600;
}

.project-actions .expand-toggle i {
    transition: transform 0.3s ease;
}

/* Expanded Details */
.project-expanded-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.expanded-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--glass-border);
}

.glass-detail-card {
    background: rgba(134, 134, 139, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .glass-detail-card {
    background: rgba(255, 255, 255, 0.01);
}

.glass-detail-card:hover {
    background: rgba(134, 134, 139, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.detail-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    user-select: none;
}

.detail-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-card-title i {
    font-size: 1.15rem;
}

.detail-card-body {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.detail-card-body p {
    margin: 0;
}

.detail-card-body ul {
    list-style-type: disc;
    padding-left: 1.15rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Detail Card Icon Color Utilities */
.text-orange { color: #f59e0b; }
.text-green { color: #10b981; }
.text-blue { color: #0071e3; }
.text-purple { color: #bf5af2; }
.text-cyan { color: #00c6ce; }
.text-gold { color: #fbbf24; }

/* Vertical Architecture Strip */
.arch-strip-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
}

.arch-node-small {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: rgba(134, 134, 139, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-align: center;
    width: 100%;
    max-width: 180px;
}

.arch-strip-vertical i {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Status Badges */
.status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.status-badge.live {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-badge.completed {
    color: var(--accent-blue);
    background: rgba(0, 113, 227, 0.08);
    border: 1px solid rgba(0, 113, 227, 0.15);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}


/* Certifications Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.cert-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: var(--border-radius-md);
    gap: 0;
    height: 100%;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.cert-card.clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .cert-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.cert-icon {
    font-size: 1.6rem;
    color: var(--text-primary);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(134, 134, 139, 0.1);
    border-radius: 14px;
    flex-shrink: 0;
    margin-bottom: 1.25rem;
}

.cert-card.clickable .cert-icon {
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-blue);
}

.cert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cert-meta {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.cert-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.cert-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 0;
    flex: 1;
}

.cert-link-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-top: 1rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cert-card.clickable:hover .cert-link-hint {
    opacity: 1;
    transform: translateX(0);
}

.highlight-card {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.05) 0%, transparent 100%);
}

/* Contact Section */
.contact-card {
    position: relative;
    padding: 4rem;
    border-radius: var(--border-radius-lg);
}

.form-group-relative {
    position: relative;
}

.handwritten-annotation {
    position: absolute;
    left: calc(100% + 20px);
    top: 30px;
    font-family: 'Patrick Hand', cursive;
    color: var(--text-secondary); /* Dynamic themed color */
    opacity: 0.85;
    font-size: 1.15rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    letter-spacing: 0.02em;
    filter: url(#hand-drawn-filter); /* Beautiful hand-drawn organic wobbles */
}

.handwritten-text {
    line-height: 1.35;
}

.hand-arrow {
    flex-shrink: 0;
    margin-top: -15px;
}

@media (max-width: 1400px) {
    .handwritten-annotation {
        display: none;
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: left;
}

.contact-left {
    display: flex;
    flex-direction: column;
}

.contact-right {
    display: flex;
    flex-direction: column;
}

.contact-headline {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.contact-text {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
}

.contact-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-md);
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
}

.contact-link-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .contact-link-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.contact-link-item .link-icon {
    font-size: 1.25rem;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-link-item.live-server-status {
    pointer-events: none;
    cursor: default;
}

.contact-link-item.live-server-status:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Live Server Monitor Dot Styles */
.pulse-dot.grey {
    background-color: #8e8e93;
    box-shadow: 0 0 0 0 rgba(142, 142, 147, 0.4);
    animation: pulse-grey 2s infinite;
}

.pulse-dot.green {
    background-color: #30d158;
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.4);
    animation: pulse-green 2s infinite;
}

.pulse-dot.yellow {
    background-color: #ffd60a;
    box-shadow: 0 0 0 0 rgba(255, 214, 10, 0.4);
    animation: pulse-yellow 2s infinite;
}

.pulse-dot.red {
    background-color: #ff453a;
    box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.4);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-grey {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(142, 142, 147, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(142, 142, 147, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(142, 142, 147, 0); }
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(48, 209, 88, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}

@keyframes pulse-yellow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 214, 10, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 214, 10, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 214, 10, 0); }
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 69, 58, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); }
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    margin-top: 2rem;
}

.form-row {
    display: flex;
    gap: 1.25rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.required-asterisk {
    color: #ff5f56;
    margin-left: 0.15rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    background: #ffffff;
    border: 1px solid rgba(134, 134, 139, 0.2);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .form-input {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-input.error {
    border-color: rgba(255, 95, 86, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 95, 86, 0.1);
}

.field-error-msg {
    color: #ff5f56;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    margin-left: 0.25rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}

.field-error-msg.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.form-input:focus {
    border-color: var(--accent-blue);
    background: rgba(134, 134, 139, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.form-submit:active {
    transform: scale(0.98);
}

.form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-micro-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Contact Modal Styles */
.contact-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-modal-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.contact-modal-footer {
    margin-top: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    opacity: 0.8;
}

.contact-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(134, 134, 139, 0.2);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    margin: 0 auto;
    animation: contact-spin 1s linear infinite;
}

@keyframes contact-spin {
    to { transform: rotate(360deg); }
}

.contact-modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.contact-modal-icon.success {
    color: var(--status-completed);
}

.contact-modal-icon.error {
    color: #ff5f56;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Responsive Design */
/* Floating Mail Button */
/* Floating Contact System Container */
.floating-contact-system {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem; /* Clean vertical spacing */
    z-index: 9999;
    pointer-events: none; /* Let clicks pass through container spacing */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.floating-contact-system > * {
    pointer-events: auto; /* Re-enable pointer events for the children */
}

/* Floating Mail Button */
.floating-mail-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.floating-mail-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    color: var(--bg-base);
}

@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }
    
    .hero-visual {
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .hero-visual .code-window {
        transform: translateX(0) !important;
        margin: 0 auto !important;
        width: 100%;
        max-width: min(440px, 90vw);
    }
    
    .hero-visual .code-window:hover {
        transform: translateY(-5px) scale(1.01) !important;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-badges, .hero-social-links, .resume-updated-wrapper {
        justify-content: center !important;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-image {
        min-height: 250px;
    }
    
    .project-card.flagship .project-img {
        object-position: center center;
    }
}

/* ===== CERTIFICATE LIGHTBOX =====
   Backdrop and panel INTENTIONALLY match the navbar's glass recipe:
   blur(20px) · var(--glass-bg) · var(--glass-border) · var(--glass-shadow)
   See the DESIGN MASTERPIECE note at the top of this file.
   ================================================================== */
.cert-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cert-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

/* Backdrop: same soft glass look as the navbar — NOT a heavy dark curtain */
.cert-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
}

[data-theme="dark"] .cert-lightbox-backdrop {
    background: rgba(0, 0, 0, 0.32);
}

/* Panel: exact navbar glass recipe */
.cert-lightbox-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 820px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transform: scale(0.94) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.cert-lightbox.active .cert-lightbox-panel {
    transform: scale(1) translateY(0);
}

.cert-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem 1rem 1.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.cert-lightbox-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 3rem);
}

.cert-lightbox-close {
    flex-shrink: 0;
    font-size: 1.2rem;
}

.cert-lightbox-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .cert-lightbox-body {
    background: rgba(0, 0, 0, 0.2);
}

.cert-lightbox-img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    display: block;
}

@media (max-width: 768px) {
    .cert-lightbox {
        padding: 1rem;
    }
    .cert-lightbox-panel {
        border-radius: var(--border-radius-md);
    }
    .cert-lightbox-img {
        max-height: 65vh;
    }
    .cert-lightbox-title {
        font-size: 0.85rem;
    }
.status-badge.completed .dot {
    background-color: var(--status-completed);
}

/* ===== END LIGHTBOX ===== */

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 4.5rem 0; /* Tightened vertical rhythm to reduce excessive whitespace */
    }

    .hero {
        min-height: auto;
        padding-top: 6.5rem;
        padding-bottom: 2.5rem;
    }

    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-actions .nav-btn {
        display: none;
    }
    
    .headline {
        font-size: 2.5rem;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .hero-quote {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .about-card {
        padding: 2rem;
    }
    
    .project-content {
        padding: 2rem;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .cert-link-hint {
        opacity: 1;
        transform: translateX(0);
    }

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

    .skill-card {
        padding: 1.75rem;
    }
    
    .contact-card {
        padding: 3rem 2rem;
    }

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

    .contact-headline {
        font-size: 2.25rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Target email text directly to wrap and prevent stretching the viewport */
    .contact-link-item span {
        word-break: break-all;
        overflow-wrap: anywhere;
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
    }

    /* Prevent availability badge from stretching the hero horizontally */
    .availability-badge {
        white-space: normal;
        text-align: center;
        line-height: 1.4;
    }

    .floating-contact-system {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    /* Tooltip appears above on mobile too, hide arrow for cleanliness */
    .floating-mail-btn[data-tooltip]::after {
        display: none;
    }
    .floating-mail-btn[data-tooltip]::before {
        right: calc(100% + 10px);
        font-size: 0.72rem;
    }

    /* Projects Section Mobile Overrides */
    .project-collapsed-layout {
        flex-direction: column;
        gap: 1.25rem;
    }

    .project-image-column {
        flex: 0 0 auto;
        width: 100%;
        height: 180px;
    }

    .project-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .flagship-ribbon {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .expanded-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .detail-card-caret {
        display: block;
        font-size: 0.8rem;
        color: var(--text-secondary);
        transition: transform 0.3s ease;
    }

    .glass-detail-card {
        cursor: pointer;
    }

    .glass-detail-card .detail-card-body {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }

    .glass-detail-card.active .detail-card-body {
        max-height: 400px;
        opacity: 1;
        padding-top: 0.75rem;
        border-top: 1px solid var(--glass-border);
        margin-top: 0.75rem;
    }

    .glass-detail-card.active .detail-card-caret {
        transform: rotate(180deg);
    }

    .detail-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
}

.detail-card-caret {
    display: none;
}


@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem; /* Gain valuable content space on tight devices */
    }

    .section {
        padding: 3.5rem 0; /* Compact vertical rhythm */
    }

    .hero {
        padding-top: 5.5rem;
        padding-bottom: 2rem;
    }

    .headline {
        font-size: 2.15rem;
        margin-bottom: 1rem;
    }

    .subheadline {
        font-size: 1.15rem;
        margin-bottom: 1.25rem;
    }

    .availability-badge {
        font-size: 0.78rem;
        padding: 0.4rem 0.85rem;
        margin-bottom: 1.25rem;
    }

    .hero-badges {
        margin-bottom: 1.75rem;
        gap: 0.5rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }

    .resume-updated-wrapper {
        margin-bottom: 1.5rem !important; /* Overrides inline style spacing */
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .hero-cta .btn {
        width: 100%; /* Clean full-width stacked button layout on mobile */
    }

    .about-card {
        padding: 1.25rem;
    }

    .about-text p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .about-quote {
        margin-top: 1.5rem !important;
        padding-left: 1rem !important;
        font-size: 0.88rem !important;
    }

    .education-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        padding: 1.25rem !important;
    }

    .stats-grid-2x2 {
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem !important;
    }

    .stat-number {
        font-size: 1.45rem !important;
    }

    .stat-label {
        font-size: 0.76rem !important;
    }

    .github-activity-strip {
        padding: 1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .github-activity-strip a {
        width: 100% !important;
        justify-content: center !important;
    }

    .skill-card {
        padding: 1.5rem;
    }

    .skill-title {
        font-size: 1rem;
    }

    .skill-desc {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .skill-chip {
        font-size: 0.78rem;
        padding: 0.25rem 0.7rem;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .project-description {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .project-stakes {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }

    .stake-text {
        font-size: 0.88rem;
    }

    .arch-strip {
        padding: 0.5rem 0.75rem;
        font-size: 0.76rem;
        gap: 0.4rem 0.5rem;
    }

    .arch-node {
        padding: 0.2rem 0.4rem;
    }

    .tech-stack {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .tech-stack span {
        font-size: 0.78rem;
        padding: 0.25rem 0.7rem;
    }

    .cert-card {
        padding: 1.25rem;
    }

    .cert-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .cert-title {
        font-size: 0.95rem;
    }

    .cert-desc {
        font-size: 0.85rem;
    }

    .contact-card {
        padding: 2rem 1.25rem;
    }

    .contact-headline {
        font-size: 1.75rem;
    }

    .contact-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .contact-link-item {
        padding: 0.75rem 1rem;
    }

    .contact-form {
        margin-top: 1.5rem;
    }

    /* Tighter transparent status modal on real-mobile screens */
    #contact-modal .cert-lightbox-panel {
        padding: 2rem 1.25rem !important;
    }

    .contact-modal-title {
        font-size: 1.35rem;
    }

    .contact-modal-desc {
        font-size: 0.9rem;
    }

    .floating-contact-system {
        bottom: 1rem;
        right: 1rem;
    }

    .floating-mail-btn {
        width: 54px; /* Exact requested size: 54-56px */
        height: 54px;
        font-size: 1.55rem;
    }

    .minimized-progress-ui {
        width: 54px; /* Perfectly aligned with the mail button above */
    }
}

/* Elastic Stretch Container */
#scroll-stretch-wrapper {
    will-change: transform;
    transform-origin: center top;
}

/* Contact Transparency Message */
.contact-transparency-msg {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.75;
    line-height: 1.4;
    transition: opacity 0.3s ease;
}
.contact-transparency-msg p {
    margin-bottom: 0.25rem;
}

/* Minimized Progress UI (Companion Status Indicator) */
.minimized-progress-ui {
    width: 60px; /* Force width to match the button above it for perfect centering */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem; /* Clean vertical spacing */
    cursor: pointer;
    animation: fade-in-up 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.minimized-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(134, 134, 139, 0.15); /* Very subtle gray base circle */
    border-top-color: var(--text-primary); /* Monochrome matching current theme text color */
    border-radius: 50%;
    animation: contact-spin 1.0s linear infinite;
}

.minimized-progress-text {
    font-size: 0.76rem; /* Small and elegant */
    font-weight: 500;
    color: var(--text-secondary); /* Low visual weight */
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    letter-spacing: 0.04em;
    opacity: 0.8;
}

/* Dots animation */
.minimized-progress-text .dots span {
    animation: loading-dots 1.5s infinite;
    opacity: 0;
}
.minimized-progress-text .dots span:nth-child(1) { animation-delay: 0s; }
.minimized-progress-text .dots span:nth-child(2) { animation-delay: 0.3s; }
.minimized-progress-text .dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes loading-dots {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Live Server Monitor Widget Styles */
.server-status-widget {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.server-status-widget .pulse-dot {
    margin-top: 0; /* override vertical alignment */
}

.form-status-widget {
    margin-bottom: 1rem;
    align-self: flex-start;
}
