:root {
    --bg-base: #000000;
    --bg-surface: #0a0a0a;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent-primary: #ffffff;
    --accent-secondary: #555555;
    --gradient-glow: linear-gradient(135deg, #ffffff 0%, #737373 100%);
    --border-color: rgba(255, 255, 255, 0.12);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container-width: 1200px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.theme-dark { background-color: var(--bg-base); color: var(--text-main); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; line-height: 1.6; background-image: radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.03), transparent 25%), radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.02), transparent 25%); }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 5%; }
.section-padding { padding: 120px 0; }
.text-gradient { background: var(--gradient-glow); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.section-label { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 3px; font-weight: 700; margin-bottom: 16px; }
.section-title { font-size: 3rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 40px; line-height: 1.2; }

/* NAV */
.glass-nav { position: fixed; top: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); z-index: 1000; height: 80px; display: flex; align-items: center; }
.nav-container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 5%; display: flex; justify-content: space-between; align-items: center; }
.brand-name { font-weight: 800; font-size: 1.4rem; text-decoration: none; letter-spacing: -0.5px; }
.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

/* BUTTONS */
.btn-primary { background: var(--text-main); color: var(--bg-base) !important; padding: 14px 28px; border-radius: 8px; font-weight: 700; text-decoration: none; display: inline-block; transition: all 0.3s ease; border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1); }
.btn-primary:hover { transform: translateY(-2px); background: #e5e5e5; box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2); }
.btn-secondary { background: transparent; color: var(--text-main) !important; padding: 14px 28px; border: 1px solid var(--border-color); border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-block; transition: all 0.3s ease; }
.btn-secondary:hover { border-color: var(--text-main); background: rgba(255, 255, 255, 0.05); }

/* HERO */
.hero-section { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.hero-title { font-size: 4.5rem; font-weight: 800; letter-spacing: -2px; line-height: 1.1; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.5rem; color: var(--text-muted); font-weight: 500; margin-bottom: 24px; }
.hero-text { font-size: 1.15rem; color: var(--text-muted); max-width: 500px; margin-bottom: 40px; line-height: 1.8; }
.hero-actions { display: flex; gap: 20px; }
.hero-image-wrapper { position: relative; border-radius: 16px; overflow: hidden; padding: 1px; background: var(--border-color); }
.hero-image { width: 100%; height: auto; display: block; border-radius: 15px; filter: grayscale(100%) contrast(110%); transition: filter 0.5s ease; }
.hero-image:hover { filter: grayscale(50%) contrast(100%); }

/* GRIDS & CARDS */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.about-text.lead { font-size: 1.5rem; color: var(--text-main); line-height: 1.6; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 60px; }
.skill-card { background: var(--bg-surface); border: 1px solid var(--border-color); padding: 40px; border-radius: 12px; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s; }
.skill-card:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, 0.4); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.skill-icon { font-size: 2.5rem; color: var(--text-main); margin-bottom: 24px; display: inline-block; }
.skill-card h3 { font-size: 1.3rem; margin-bottom: 16px; font-weight: 700; }
.skill-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; }
.contact-info-card { background: var(--bg-surface); padding: 40px; border-radius: 16px; border: 1px solid var(--border-color); }
.contact-item { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 30px; }
.contact-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--text-main); flex-shrink: 0; }
.contact-item h4 { font-size: 1.1rem; margin-bottom: 4px; }
.contact-item p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.form-group { margin-bottom: 24px; }
.form-label { display: block; color: var(--text-main); font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.form-control { width: 100%; background: #000000; border: 1px solid var(--border-color); color: var(--text-main); padding: 16px; border-radius: 8px; font-family: var(--font-sans); outline: none; transition: all 0.3s; }
.form-control:focus { border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.form-control::placeholder { color: #555555; }

/* IFRAME PREVIEWS */
.project-preview { width: 100%; height: 260px; margin-bottom: 24px; border-radius: 8px; overflow: hidden; position: relative; background: #000; border: 1px solid var(--border-color); }
.project-preview::before { content: ''; display: block; height: 24px; background: #111; border-bottom: 1px solid var(--border-color); width: 100%; position: absolute; top: 0; left: 0; z-index: 5; }
.project-preview::after { content: ''; position: absolute; top: 9px; left: 12px; width: 6px; height: 6px; border-radius: 50%; background: #333; box-shadow: 12px 0 0 #333, 24px 0 0 #333; z-index: 6; }
.project-iframe { width: 200%; height: calc(200% - 48px); transform: scale(0.5); transform-origin: top left; border: none; position: absolute; top: 24px; left: 0; z-index: 1; pointer-events: none; transition: filter 0.3s ease; }
.skill-card .project-iframe { filter: grayscale(20%) brightness(0.8); }
.skill-card:hover .project-iframe { filter: grayscale(0%) brightness(1); }

/* The Hamburger Button */
.mobile-toggle { display: none; flex-direction: column; justify-content: space-between; width: 32px; height: 20px; background: transparent; border: none; cursor: pointer; z-index: 1002; }
/* The Hamburger Lines */
.mobile-toggle span { display: block; width: 100%; height: 2px; background-color: var(--text-main); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }

/* The Animated 'X' State */
.mobile-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* The Full-Screen Glass Overlay */
.mobile-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 1001; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 32px; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.mobile-menu.active { opacity: 1; pointer-events: auto; }
.mobile-menu a:not(.btn-primary) { color: var(--text-main); font-size: 1.8rem; font-weight: 700; text-decoration: none; letter-spacing: -1px; transition: color 0.3s;}
.mobile-menu a.active, .mobile-menu a:hover:not(.btn-primary) { color: var(--text-muted); }

/* =========================================
   UX MICRO-INTERACTIONS (Animations)
   ========================================= */

/* 1. The Scroll Progress Bar */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--gradient-glow); width: 0%; z-index: 9999; transition: width 0.1s ease-out; box-shadow: 0 1px 10px rgba(255, 255, 255, 0.3); }
/* 2. The Reveal Animation Initial State */
.reveal-up { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
/* 3. The Reveal Animation Active State */
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

/* Add slight delay so grid items load sequentially like a cascading wave */
.skill-card:nth-child(2) { transition-delay: 0.1s; } .skill-card:nth-child(3) { transition-delay: 0.2s; } .skill-card:nth-child(4) { transition-delay: 0.3s; } .skill-card:nth-child(5) { transition-delay: 0.4s; }

/* Unified Structural Site Footer */
.site-footer { border-top: 1px solid var(--border-color); padding: 40px 0; margin-top: 80px; background-color: var(--bg-base); }

.footer-wrapper { display: flex; justify-content: space-between; align-items: center; gap: 20px; }

.footer-col { flex: 1; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.footer-portal-btn { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition-smooth); }
.footer-portal-btn:hover { color: var(--text-main); }

.footer-social-cluster { display: inline-flex; align-items: center; gap: 28px; }
.footer-social-cluster a { color: var(--text-muted); font-size: 1.3rem; transition: var(--transition-smooth); display: inline-block; }
.footer-social-cluster a:hover { color: var(--text-main); transform: translateY(-2px); }

.footer-copyright-stamp { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; white-space: nowrap; }

/* =========================================
   RESPONSIVE BREAKPOINTS
   ========================================= */
@media (max-width: 992px) {
    .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 3.5rem; }
    .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Hide desktop nav, show mobile toggle */
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
    
    .hero-title { font-size: 2.8rem; }
    .hero-actions { flex-direction: column; }
    .skills-grid { grid-template-columns: 1fr; }
    
    /* Optimize the iframe previews for mobile */
    .project-preview { height: 200px; }
    .footer-wrapper { flex-direction: column; text-align: center; gap: 24px; }
}