/* ============================================
   DESIGN SYSTEM - CSS VARIABLES
   ============================================ */

:root {
    /* Colors - Light Theme (Default) */
    --color-primary: #111111;
    --color-primary-hover: #333333;
    --color-primary-subtle: rgba(17, 17, 17, 0.05);
    --color-secondary: #444444;
    --color-secondary-hover: #666666;
    
    /* WCAG-compliant backgrounds - avoid pure white */
    --color-background: #fafafa;
    --color-surface: #f5f5f5;
    --color-surface-elevated: #ffffff;
    --color-surface-hover: #eeeeee;
    
    /* WCAG-compliant text - avoid pure black on large blocks */
    --color-text: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-muted: #6a6a6a;
    
    --color-border: #e0e0e0;
    --color-border-hover: #cccccc;
    
    --color-accent: #333333;
    
    /* Gradients - Subtle greyscale */
    --gradient-primary: linear-gradient(135deg, #111111 0%, #333333 100%);
    --gradient-surface: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
    --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 0, 0, 0.03), transparent);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    --font-size-7xl: 4.5rem;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.1;
    --line-height-snug: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    
    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
    --space-32: 128px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(0, 0, 0, 0.06);
    --shadow-glow-lg: 0 0 60px rgba(0, 0, 0, 0.08);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
    
    /* Layout */
    --max-width: 1200px;
    --max-width-sm: 640px;
    --max-width-md: 768px;
    --max-width-lg: 1024px;
    
    --nav-height: 72px;
}

/* Dark Theme */
[data-theme="dark"] {
    /* WCAG-compliant dark background - softer than pure black */
    --color-background: #121212;
    --color-surface: #1e1e1e;
    --color-surface-elevated: #262626;
    --color-surface-hover: #2e2e2e;
    
    /* WCAG-compliant text - softer than pure white */
    --color-text: #e8e8e8;
    --color-text-secondary: #b0b0b0;
    --color-muted: #8a8a8a;
    
    --color-border: #3a3a3a;
    --color-border-hover: #4a4a4a;
    
    --color-primary: #e8e8e8;
    --color-primary-hover: #ffffff;
    --color-primary-subtle: rgba(255, 255, 255, 0.08);
    
    --color-accent: #cccccc;
    
    --gradient-primary: linear-gradient(135deg, #e8e8e8 0%, #cccccc 100%);
    --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 255, 255, 0.03), transparent);
    
    /* Reduced shadow opacity for dark theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.03);
}

/* ============================================
   BACKGROUND BLOCK SYSTEM (block.js)
   Global background wrapper for entire app
   ============================================ */

.background-block {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--color-background);
    transition: background-color var(--transition-base);
}

/* Subtle texture layer for depth */
.background-block__texture {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

[data-theme="dark"] .background-block__texture {
    opacity: 0.15;
}

/* Gradient overlay for visual depth */
.background-block__gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(0, 0, 0, 0.02), transparent 70%);
}

[data-theme="dark"] .background-block__gradient {
    background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(255, 255, 255, 0.02), transparent 70%);
}

/* Theme transition state */
.background-block--transitioning {
    transition: background-color 300ms ease;
}

/* Body with background block active */
body.has-background-block {
    background-color: transparent;
}

/* Ensure sections are transparent - background from block.js */
.section,
.hero,
.about,
.projects,
.experience,
.skills,
.contact {
    background: transparent;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

ul, ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.section {
    padding: var(--space-24) 0;
    position: relative;
}

.gradient-text {
    color: var(--color-text);
    font-weight: var(--font-weight-bold);
}

.highlight {
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.section-tag {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    color: var(--color-muted);
    font-weight: var(--font-weight-medium);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--color-border), transparent);
    margin-left: var(--space-4);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: scale(0.98);
}

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

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

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

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

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover {
    color: var(--color-text);
    background: var(--color-surface);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

[data-theme="dark"] .navbar {
    background: rgba(14, 14, 14, 0.9);
}

.navbar.scrolled {
    border-color: var(--color-border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Navbar profile icon */
.nav-profile-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--color-border);
    transition: all var(--transition-fast);
}

.nav-profile-icon:hover {
    border-color: var(--color-text);
    transform: scale(1.05);
}

.logo-text {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width var(--transition-base);
}

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

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

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--color-text);
    background: var(--color-surface);
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

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

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.hamburger {
    width: 20px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

.mobile-menu-btn.active .hamburger {
    background: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-6);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-nav-link {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    padding: var(--space-3) 0;
    transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
    color: var(--color-text);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black, transparent);
}

[data-theme="dark"] .hero-grid {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.hero-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    width: fit-content;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-text);
    border-radius: var(--radius-full);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.greeting {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
}

.name-wrapper {
    overflow: hidden;
}

.name {
    font-size: clamp(var(--font-size-5xl), 8vw, var(--font-size-7xl));
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

.hero-tagline {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    max-width: 500px;
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    width: fit-content;
}

.hero-education {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.hero-university {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.hero-batch {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
    font-family: var(--font-mono);
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    padding-top: var(--space-4);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Profile Image Styles */
.profile-image-container {
    position: relative;
    width: 320px;
    height: 320px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-2xl);
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-base);
}

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

.profile-image-bg {
    position: absolute;
    inset: -8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    z-index: -1;
}

/* Code Window Styles (fallback if no image) */
.code-window {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-elevated);
    border-bottom: 1px solid var(--color-border);
}

.code-dots {
    display: flex;
    gap: var(--space-2);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
}

.dot.red { background: #999999; }
.dot.yellow { background: #bbbbbb; }
.dot.green { background: #666666; }

[data-theme="dark"] .dot.red { background: #666666; }
[data-theme="dark"] .dot.yellow { background: #888888; }
[data-theme="dark"] .dot.green { background: #aaaaaa; }

.code-title {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
    font-family: var(--font-mono);
}

.code-body {
    padding: var(--space-4);
}

.code-body pre {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.code-keyword { color: #666666; }
.code-variable { color: #444444; }
.code-property { color: #555555; }
.code-string { color: #333333; }

[data-theme="dark"] .code-keyword { color: #bbbbbb; }
[data-theme="dark"] .code-variable { color: #dddddd; }
[data-theme="dark"] .code-property { color: #cccccc; }
[data-theme="dark"] .code-string { color: #aaaaaa; }

.code-cursor {
    animation: blink 1s infinite;
    color: var(--color-text);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-muted);
    font-size: var(--font-size-xs);
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    position: relative;
}

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

@keyframes scroll {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 0.3; }
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.about-lead {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-relaxed);
}

.about-text p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: var(--font-size-xl);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
}

.stat-icon svg {
    width: 18px;
    height: 18px;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.stat-value {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

/* Background handled by block.js - sections are transparent */
.projects {
    background: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: var(--space-8);
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

/* Project card hover: slight scale + soft shadow change */
.project-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

/* Project actual images */
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

/* Hover animation for project images */
.project-card:hover .project-img {
    transform: scale(1.05);
}

/* Ensure images don't overpower text */
.project-img {
    filter: brightness(0.95);
}

[data-theme="dark"] .project-img {
    filter: brightness(0.85);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.06) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-placeholder-alt {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.08) 100%);
}

.project-placeholder-third {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.03) 100%);
}

[data-theme="dark"] .project-placeholder {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.06) 100%);
}

[data-theme="dark"] .project-placeholder-alt {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.08) 100%);
}

[data-theme="dark"] .project-placeholder-third {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.project-icon {
    color: var(--color-muted);
    z-index: 1;
}

.project-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 0, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
}

[data-theme="dark"] .project-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

[data-theme="dark"] .project-overlay {
    background: rgba(0, 0, 0, 0.8);
}

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

.project-link-overlay {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: #ffffff;
    color: #111111;
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    transform: translateY(10px);
    transition: transform var(--transition-base);
}

.project-card:hover .project-link-overlay {
    transform: translateY(0);
}

.project-content {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.project-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.project-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
}

.project-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-muted);
    font-weight: var(--font-weight-medium);
}

.project-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.feature svg {
    color: var(--color-text);
    flex-shrink: 0;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tech-chip {
    padding: var(--space-1) var(--space-3);
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-mono);
}

.project-actions {
    padding-top: var(--space-2);
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */

/* Background handled by block.js */
.experience {
    background: transparent;
}

.experience-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.experience-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
}

.experience-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.experience-title-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.experience-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
}

.experience-role {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
}

.experience-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-1);
}

.experience-level {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
    padding: var(--space-1) var(--space-3);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.experience-organizer {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
}

.experience-problem {
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.problem-label {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    margin-bottom: var(--space-2);
}

.problem-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-1);
}

.problem-ministry {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.experience-description {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.experience-description p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

.experience-description ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-left: var(--space-4);
}

.experience-description li {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    position: relative;
}

.experience-description li::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-4));
    top: 0.6em;
    width: 4px;
    height: 4px;
    background: var(--color-text);
    border-radius: 50%;
}

.experience-link {
    margin-top: var(--space-4);
}

.experience-link a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.experience-link a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* ============================================
   SKILLS SECTION
   ============================================ */

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

.skill-category {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.skill-category:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.skill-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-elevated);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.skill-category-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.skill-badge {
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    cursor: default;
}

.skill-badge:hover {
    border-color: var(--color-text);
    color: var(--color-text);
    background: var(--color-surface-hover);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

/* Background handled by block.js */
.contact {
    background: transparent;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    align-items: center;
    text-align: center;
}

.contact-text {
    max-width: 600px;
}

.contact-lead {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-4);
}

.contact-text p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

.contact-card {
    width: 100%;
    max-width: 560px;
}

.contact-card-inner {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
}

.contact-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    text-align: left;
}

.contact-link:hover {
    border-color: var(--color-border-hover);
    background: var(--color-surface-hover);
    transform: translateX(4px);
}

.contact-link-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.contact-link-label {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.contact-link-value {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.contact-link-arrow {
    color: var(--color-muted);
    transition: all var(--transition-fast);
}

.contact-link:hover .contact-link-arrow {
    color: var(--color-text);
    transform: translate(2px, -2px);
}

.contact-cta {
    display: flex;
    justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */

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

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    text-align: center;
}

.footer-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.footer-copyright {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: 
        opacity var(--transition-slow),
        transform var(--transition-slow);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations */
.hero-content .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.hero-content .animate-on-scroll:nth-child(2) { transition-delay: 100ms; }
.hero-content .animate-on-scroll:nth-child(3) { transition-delay: 200ms; }
.hero-content .animate-on-scroll:nth-child(4) { transition-delay: 300ms; }
.hero-content .animate-on-scroll:nth-child(5) { transition-delay: 400ms; }

.hero-visual.animate-on-scroll { transition-delay: 300ms; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-tagline {
        max-width: 100%;
    }
    
    .hero-info {
        align-items: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .profile-image-container {
        width: 240px;
        height: 240px;
    }
    
    .code-window {
        max-width: 360px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .experience-meta {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }
    
    .section {
        padding: var(--space-16) 0;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .theme-toggle {
        margin-right: var(--space-2);
    }
    
    .section-header {
        flex-wrap: wrap;
    }
    
    .section-line {
        display: none;
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .name {
        font-size: var(--font-size-4xl);
    }
    
    .hero-tagline {
        font-size: var(--font-size-lg);
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .profile-image-container {
        width: 200px;
        height: 200px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .experience-card {
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .hero-info {
        width: 100%;
    }
    
    .code-window {
        max-width: 100%;
    }
    
    .contact-card-inner {
        padding: var(--space-6);
    }
    
    .contact-link {
        padding: var(--space-3);
    }
    
    .contact-link-icon {
        width: 40px;
        height: 40px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   FLOATING DOCK COMPONENT
   ============================================ */

.dock {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%) translateY(0);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: var(--z-sticky);
    transition: all var(--transition-base);
    animation: dock-float 4s ease-in-out infinite;
}

.dock:hover {
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dock {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .dock:hover {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

@keyframes dock-float {
    0%, 100% {
        transform: translateX(-50%) translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateX(-50%) translateY(-8px) rotate(0.5deg);
    }
    50% {
        transform: translateX(-50%) translateY(-12px) rotate(0deg);
    }
    75% {
        transform: translateX(-50%) translateY(-8px) rotate(-0.5deg);
    }
}

.dock-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    background: transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dock-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-fast);
}

.dock-item:hover::before {
    opacity: 1;
    transform: scale(1);
}

.dock-item:hover {
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dock-item:focus {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.dock-item svg {
    width: 20px;
    height: 20px;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 1;
}

.dock-item:hover svg {
    transform: translateY(-1px) scale(1.05);
}

/* Dock responsive adjustments */
@media (max-width: 768px) {
    .dock {
        bottom: var(--space-4);
        padding: var(--space-2);
        gap: var(--space-1);
    }
    
    .dock-item {
        width: 40px;
        height: 40px;
    }
    
    .dock-item svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   STATUS INDICATOR (Green Dot)
   ============================================ */

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-muted);
    flex-shrink: 0;
}

.status-dot--available {
    background: #22c55e;
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        opacity: 0.85;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}

/* Dark theme - green dot stays green but slightly adjusted */
[data-theme="dark"] .status-dot--available {
    background: #4ade80;
}

/* ============================================
   UNIVERSITY LINK
   ============================================ */

.university-link {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.university-link:hover {
    opacity: 0.8;
    border-bottom-color: var(--color-text-secondary);
}

.university-link:focus {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}