:root {
    --bg: #000000;
    --text-100: rgba(255, 255, 255, 1);
    --text-70: rgba(255, 255, 255, 0.7);
    --text-60: rgba(255, 255, 255, 0.6);
    --text-20: rgba(255, 255, 255, 0.2);
    --glass-subtle: rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.15);
    --neon-red: #ff4c4c;
    --neon-green: #4cff7a;
    --neon-blue: #4c9eff;
    --coffee-yellow: #ffdd00;
}

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

body { background-color: var(--bg); color: var(--text-70); font-family: 'Barlow', sans-serif; font-weight: 300; overflow: hidden; height: 100vh; width: 100vw; }

/* Boot Screen */
#boot-screen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 1s ease; }
.boot-text { font-family: 'Fira Code', monospace; color: var(--text-60); margin-bottom: 20px; font-size: 14px; }
.boot-loader { width: 120px; height: 2px; background: var(--text-20); overflow: hidden; }
.boot-loader::after { content: ''; display: block; width: 40%; height: 100%; background: var(--text-100); animation: loading 1.5s infinite ease-in-out; }
@keyframes loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* Top Menu Bar */
#top-bar { position: fixed; top: 0; left: 0; right: 0; height: 32px; background: var(--glass-subtle); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); border-bottom: 1px solid var(--text-20); display: flex; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 1000; font-size: 13px; font-family: 'Fira Code', monospace; }
.menu-left, .menu-right { display: flex; gap: 15px; align-items: center; }
.menu-logo { font-weight: 700; color: var(--text-100); margin-right: 10px; }
.menu-item { color: var(--text-60); cursor: pointer; }
.menu-item:hover { color: var(--text-100); }

/* Dropdown Menus */
.menu-dropdown { position: relative; }
.dropdown-content { display: none; position: absolute; top: 32px; left: 0; background: var(--glass-strong); backdrop-filter: blur(50px); border: 1px solid var(--border-glass); border-radius: 8px; padding: 5px; min-width: 180px; z-index: 1001; }
.dropdown-content.show { display: block; }
.dropdown-item { padding: 8px 12px; font-family: 'Barlow', sans-serif; font-size: 13px; color: var(--text-70); border-radius: 4px; cursor: pointer; }
.dropdown-item:hover { background: var(--glass-subtle); color: var(--text-100); }

/* Desktop & Wallpapers */
#desktop { position: relative; width: 100vw; height: calc(100vh - 32px); margin-top: 32px; transition: background 0.5s ease; }
.wp-1 { background: radial-gradient(circle at 30% 20%, #1a2a3a 0%, #000000 70%); }
.wp-2 { background: radial-gradient(circle at 70% 30%, #3a1a2a 0%, #000000 70%); }
.wp-3 { background: radial-gradient(circle at 50% 50%, #0a0a0a 0%, #000000 100%); }
.wp-4 { background: linear-gradient(135deg, #1e1e1e 0%, #000000 100%); }

/* OS Windows (Liquid Glass) */
.window { position: absolute; width: 550px; max-height: 65vh; background: var(--glass-subtle); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-glass); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: none; flex-direction: column; overflow: hidden; z-index: 10; }
.window.active { display: flex; animation: windowOpen 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes windowOpen { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.title-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background: var(--glass-strong); border-bottom: 1px solid var(--text-20); cursor: grab; }
.traffic-lights { display: flex; gap: 6px; }
.light { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.title-text { font-family: 'Fira Code', monospace; font-size: 12px; color: var(--text-70); margin-left: 10px; flex-grow: 1; }
.window-actions { display: flex; gap: 10px; align-items: center; }
.action-btn { background: var(--glass-subtle); border: 1px solid var(--border-glass); color: var(--text-100); padding: 4px 10px; border-radius: 6px; font-size: 11px; cursor: pointer; font-family: 'Fira Code', monospace; }
.action-btn:hover { background: var(--glass-strong); }
.close-btn { background: none; border: none; color: var(--text-60); cursor: pointer; font-size: 14px; }
.close-btn:hover { color: var(--text-100); }

.window-content { padding: 30px; overflow-y: auto; }
.window-content::-webkit-scrollbar { width: 4px; }
.window-content::-webkit-scrollbar-thumb { background: var(--text-20); }

/* About Me Layout & Profile Image */
.about-layout { display: flex; gap: 25px; }
.profile-img-container { flex-shrink: 0; width: 140px; height: 140px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-glass); box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.profile-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.1) brightness(0.9); transition: filter 0.4s ease; }
.profile-img:hover { filter: grayscale(0%) contrast(1) brightness(1); }
.about-text { flex-grow: 1; }

/* Typography */
.os-heading { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 32px; color: var(--text-100); margin-bottom: 5px; font-weight: 400; }
.os-subtext { font-family: 'Barlow', sans-serif; font-size: 15px; color: var(--text-70); margin-bottom: 15px; }
.os-subheading { font-family: 'Barlow', sans-serif; font-size: 16px; color: var(--text-100); font-weight: 600; margin-bottom: 5px; }
.os-body { font-family: 'Barlow', sans-serif; font-size: 14px; color: var(--text-60); line-height: 1.6; margin-bottom: 12px; }
a { color: var(--text-100); text-decoration: underline; text-decoration-color: var(--text-20); }
.divider { height: 1px; background: var(--text-20); margin: 20px 0; }

/* Project Cards & Categories */
.proj-category { font-family: 'Fira Code', monospace; font-size: 12px; color: var(--text-60); text-transform: uppercase; letter-spacing: 1px; margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid var(--text-20); padding-bottom: 5px; }
.project-card { padding: 15px; background: rgba(255,255,255,0.03); border: 1px solid var(--text-20); border-radius: 8px; margin-bottom: 12px; }
.proj-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.demo-btn { background: var(--glass-strong); border: 1px solid var(--border-glass); color: var(--text-100); padding: 4px 10px; border-radius: 6px; font-size: 11px; cursor: pointer; font-family: 'Fira Code', monospace; transition: all 0.2s; }
.demo-btn:hover { background: var(--text-100); color: var(--bg); box-shadow: 0 0 10px rgba(255,255,255,0.2); }

/* Resume Document Layout */
.resume-doc { background: rgba(255,255,255,0.03); }
.resume-header { display: flex; justify-content: space-between; border-bottom: 1px solid var(--text-20); padding-bottom: 15px; margin-bottom: 20px; }
.resume-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
.resume-col-left .os-body { margin-bottom: 5px; }
.resume-section-title { font-family: 'Barlow', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-70); border-bottom: 1px solid var(--text-20); padding-bottom: 5px; margin-bottom: 10px; }
.resume-item-title { font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 600; color: var(--text-100); }
.resume-item-sub { font-family: 'Barlow', sans-serif; font-size: 13px; color: var(--text-70); }
.resume-item-date { font-family: 'Fira Code', monospace; font-size: 11px; color: var(--text-60); margin-bottom: 10px; }
.resume-project { margin-bottom: 15px; }

/* Cert Gallery & List */
.cert-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }
.cert-item { display: flex; flex-direction: column; align-items: center; }
.cert-img { width: 100%; height: 120px; object-fit: contain; border-radius: 8px; border: 1px solid var(--text-20); background: rgba(255,255,255,0.05); padding: 5px; filter: grayscale(20%); transition: filter 0.3s; }
.cert-img:hover { filter: grayscale(0%); }
.cert-label { font-family: 'Fira Code', monospace; font-size: 10px; color: var(--text-70); margin-top: 8px; text-align: center; }
.cert-list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cert-list-item { font-size: 13px; margin-bottom: 6px; }

/* Contact Layout & Donation Button */
.contact-layout { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.donation-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--text-20); text-align: center; }
.donation-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--coffee-yellow); color: #000; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; font-family: 'Barlow', sans-serif; font-size: 14px; transition: transform 0.2s, box-shadow 0.2s; }
.donation-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 221, 0, 0.3); text-decoration: none; }
.donation-btn svg { width: 18px; height: 18px; }

/* Demo Window Content */
.demo-content { padding: 0; height: 400px; display: flex; flex-direction: column; }
.demo-ui { flex-grow: 1; padding: 20px; font-family: 'Fira Code', monospace; font-size: 13px; position: relative; overflow: hidden; display: flex; flex-direction: column; }

/* NovaMind Chat Demo */
.chat-log { display: flex; flex-direction: column; gap: 15px; height: 100%; overflow-y: auto; padding-right: 10px; flex-grow: 1; }
.chat-bubble { max-width: 80%; padding: 10px 15px; border-radius: 12px; opacity: 0; transform: translateY(20px); filter: blur(10px); animation: chatAppear 0.6s forwards; }
.chat-bubble.user { align-self: flex-end; background: var(--glass-strong); color: var(--text-100); }
.chat-bubble.ai { align-self: flex-start; background: rgba(78, 158, 255, 0.1); border: 1px solid rgba(78, 158, 255, 0.3); color: var(--neon-blue); }
@keyframes chatAppear { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.chat-typing { display: flex; gap: 4px; padding: 5px 0; }
.chat-typing span { width: 8px; height: 8px; background: var(--text-60); border-radius: 50%; animation: typing 1s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; } .chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.chat-controls { display: flex; gap: 10px; padding-top: 10px; border-top: 1px solid var(--text-20); align-items: center; }
.chat-select { background: var(--glass-subtle); border: 1px solid var(--text-20); color: var(--text-100); padding: 8px; border-radius: 6px; font-family: 'Fira Code', monospace; font-size: 12px; outline: none; }
.chat-input { flex-grow: 1; background: var(--glass-subtle); border: 1px solid var(--text-20); color: var(--text-100); padding: 10px; border-radius: 6px; font-family: 'Fira Code', monospace; }
.chat-send { background: var(--text-100); color: var(--bg); border: none; padding: 0 15px; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* CAIN Threat Feed Demo */
.threat-feed { height: 100%; overflow-y: auto; }
.threat-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--glass-subtle); border: 1px solid var(--text-20); border-radius: 6px; margin-bottom: 10px; opacity: 0; transform: translateX(-20px); filter: blur(10px); animation: threatAppear 0.5s forwards; }
@keyframes threatAppear { to { opacity: 1; transform: translateX(0); filter: blur(0); } }
.threat-sev { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.sev-high { background: rgba(255, 76, 76, 0.2); color: var(--neon-red); border: 1px solid var(--neon-red); }
.sev-med { background: rgba(255, 189, 46, 0.2); color: #ffbd2e; border: 1px solid #ffbd2e; }
.sev-low { background: rgba(76, 255, 122, 0.2); color: var(--neon-green); border: 1px solid var(--neon-green); }

/* Terminal Window */
.term-content { font-family: 'Fira Code', monospace; color: var(--text-70); font-size: 13px; background: rgba(0,0,0,0.3); }
#terminal-output { margin-bottom: 10px; white-space: pre-wrap; }
#terminal-input-line { display: flex; align-items: center; }
#term-prompt { color: var(--text-100); margin-right: 8px; white-space: nowrap; }
#terminal-input { background: transparent; border: none; outline: none; color: var(--text-100); font-family: 'Fira Code', monospace; font-size: 13px; flex-grow: 1; padding: 0; margin: 0; caret-color: var(--text-100); }

/* Floating Dock */
#dock { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; padding: 10px 15px; background: var(--glass-strong); backdrop-filter: blur(50px); -webkit-backdrop-filter: blur(50px); border: 1px solid var(--border-glass); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); z-index: 1000; }
.dock-btn { width: 40px; height: 40px; background: transparent; border: none; color: var(--text-70); cursor: pointer; transition: all 0.2s ease; display: flex; justify-content: center; align-items: center; }
.dock-btn:hover { color: var(--text-100); transform: translateY(-5px); }
.dock-btn svg { width: 24px; height: 24px; }

/* Mobile */
@media (max-width: 600px) {
    .window { width: 90vw; left: 5vw !important; max-height: 70vh; }
    .about-layout { flex-direction: column; align-items: center; text-align: center; }
    .resume-grid { grid-template-columns: 1fr; }
    .cert-gallery { grid-template-columns: 1fr; }
    .cert-list-grid { grid-template-columns: 1fr; }
    .os-heading { font-size: 24px; }
    .menu-left .menu-item:not(.menu-logo), .menu-right .menu-item:not(#clock) { display: none; }
}

/* Print Styles for Resume */
@media print {
    body * { visibility: hidden; }
    #win-resume, #win-resume * { visibility: visible; }
    #win-resume { position: absolute; left: 0; top: 0; width: 100%; max-height: none; border: none; background: #fff; color: #000; box-shadow: none; }
    #win-resume .title-bar { display: none !important; }
    .resume-doc { background: #fff; padding: 40px; }
    .os-heading, .os-subtext, .resume-item-title, .resume-section-title { color: #000 !important; }
    .os-body, .resume-item-sub, .resume-item-date { color: #333 !important; }
    .resume-header, .resume-section-title { border-color: #ccc !important; }
}